Please see the below code
Test 1:-
Feature: To test login feature
Background:
Given User landed on login page
Scenario Outline: Login with valid credentials
Given User enter credentials with userid <username> and password <password>
When User click login button
Then user navigate to url "url to landing page"
Test 2:-
Feature: To test AddNewPatient feature
Background:
Given User landed on login page
And User enter credentials with userid <username> and password <password>
And User click login button
Scenario Outline: Cancel to AddNewPatient
Given User click addNewPatient link
When when user click cancel
Then user navigate to main page
How can i use test 1 Given, when in test2 Background?
Not able to implement step definition file with this confusion
Related
Feature: login file
Scenario: sucess with login with credential
Given user launch chrome browser
When user open url "http://admin-demo.nopcommerce.com/login"
And user enter email "admin#yourstore.com" and password "admin"
And click on login dashboard
Then page title should be "Dashboard / nopCommerce administration"
When user click on logout
Then page title should be "Your store. Login"
And close browser
Scenario: search Customer By e-mail
Given user launch chrome browser
When user open url "http://admin-demo.nopcommerce.com/login"
And user enter email "admin#yourstore.com" and password "admin"
And click on login dashboard
Then page title should be "Dashboard / nopCommerce administration"
When user click on logout
Then page title should be "Your store. Login"
When user click on customer name
And click on customers menu item
And enter custome email
When click on search button
Then user should found email in the serach box
And close browser
The first scenario generated to glue code after spending hours. Then when I copied the first scenario to second scenario "search by email", the glue code was not generated for the additional steps in second scenario? I do not know what I am doing wrong?
How to reset GitLab user password of a normal user via UI ?
(Via command line it is possible using rake)
We are using an on-premise GitLab community edition
To change/reset your own GitLab user password: see change your password
As a GitLab administrator, to (re)set another user's password in the UI:
Navigate to Admin Area -> Users
Locate the user whose password you want to reset
Click "edit"
Enter new password (and again in confirmation field)
Click "save"
As you mentioned, you can also use a rake task or rails console.
When we create a new Azure AD account and force user change password at first time login, then when user login it will display the page to ask user to change password call "Update your password" page. We need to add more information about the password rule to original "Update your password" page of AAD.
My question is that can we do that?
I am very appreciated any help.
Thank you very much.
This is "update your password" page when new user login at the first time
In Azure ADB2C pwd reset policy, once the user provides email and enters verification code can change email or update password. How to disable the option to change email and only give the ability to change password. Any help would be appreciated
The only way is to use CSS to hide the element.
Navigate to Page layouts, and then under Forgot password page, click Yes for Use custom page content. You could refer to the doc about customize UI.
Add code in the xxx.css(sample) of reset password.
#email_ver_but_edit {
display: none;
}
We have Azure AD B2C sign-in policy for local accounts.
When we are creating new users via Graph API with temporary password and flag ForceChangePasswordNextLogin = true; and such users try to login first time in the browser where previously was issued any other session at https://login.microsoftonline.com/TENNANT_NAME/oauth2/authorize url - we have next strange behaviour :
User fills out email and temporary password, submit the form.
Microsoft prompt to change the password with the message - "Update your password
You need to update your password because this is the first time you are signing in, or because your password has expired."
User enters current temporary password, new password, confirm new password and submits the form
Sometimes chrome shows empty page with message "Bad Request", other times user redirects back to sign in page with message - "By security reasons sign in again"
User enters again email and temporary password, submits the form
Microsoft again force user to change the password with the same message as at step #2 , but now if user enters temporary password in "Current password" field - Microsoft will not accept it and show an error that password incorrect. Instead of, user should enter password which he provided as new at step #3 and change it to a completely new one.
Sometimes user gets redirected to return url with access token, sometimess steps 4-6 repeated again.
If check the audit log from Azure AD it will look like :
This is not reproducing in newly opened incognito page