MDL-62354 tool_policy: Reflect the strings improvements in Behat tests

This commit is contained in:
David Mudrák 2018-05-09 22:19:43 +02:00
parent a5591614d5
commit 14e0ab3536
2 changed files with 43 additions and 43 deletions

View File

@ -43,7 +43,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I navigate to "Users > Privacy and policies > User agreements" in site administration
And "Agreed" "icon" should exist in the "User One" "table_row"
And "Agreed" "icon" should exist in the "Max Manager" "table_row"
And "Not agreed" "icon" should exist in the "User Two" "table_row"
And "Consent not given" "icon" should exist in the "User Two" "table_row"
Scenario: Agree on behalf of another user as a manager, single policy, javascript off
Given I log in as "admin"
@ -57,17 +57,17 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I press "Next"
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
And I click on "Not agreed" "link" in the "User One" "table_row"
Then I should see "Agree on behalf of the user"
And I click on "Consent not given" "link" in the "User One" "table_row"
Then I should see "Give consent on behalf of user"
And I should see "User One"
And I should see "This site policy"
And I should see "I acknowledge that I have received the user's request to consent on the abovementioned policy on behalf of the user."
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
And I set the field "Remarks" to "Consent received from a parent"
And I press "Agree"
And "Agreed on behalf of" "icon" should exist in the "User One" "table_row"
And I press "Give consent on behalf of user"
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
And "Max Manager" "link" should exist in the "User One" "table_row"
And "Consent received from a parent" "text" should exist in the "User One" "table_row"
And "Not agreed" "icon" should exist in the "User Two" "table_row"
And "Consent not given" "icon" should exist in the "User Two" "table_row"
@javascript
Scenario: Agree on behalf of another user as a manager, single policy, javascript on
@ -82,17 +82,17 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I press "Next"
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
And I click on "Not agreed" "link" in the "User One" "table_row"
Then I should see "Agree on behalf of the user"
And I click on "Consent not given" "link" in the "User One" "table_row"
Then I should see "Give consent on behalf of user"
And I should see "User One"
And I should see "This site policy"
And I should see "I acknowledge that I have received the user's request to consent on the abovementioned policy on behalf of the user."
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
And I set the field "Remarks" to "Consent received from a parent"
And I press "Agree"
And "Agreed on behalf of" "icon" should exist in the "User One" "table_row"
And I press "Give consent on behalf of user"
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
And "Max Manager" "link" should exist in the "User One" "table_row"
And "Consent received from a parent" "text" should exist in the "User One" "table_row"
And "Not agreed" "icon" should exist in the "User Two" "table_row"
And "Consent not given" "icon" should exist in the "User Two" "table_row"
Scenario: View acceptances made by users on their own, multiple policies
Given I log in as "admin"
@ -119,9 +119,9 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I press "Next"
And I navigate to "Users > Privacy and policies > User agreements" in site administration
And "Agreed" "icon" should exist in the "User One" "table_row"
And "Not agreed" "icon" should not exist in the "User One" "table_row"
And "Consent not given" "icon" should not exist in the "User One" "table_row"
And "Agreed" "icon" should exist in the "Max Manager" "table_row"
And "Not agreed" "icon" should exist in the "User Two" "table_row"
And "Consent not given" "icon" should exist in the "User Two" "table_row"
And "Agreed" "icon" should not exist in the "User Two" "table_row"
And I click on "2 of 2" "link" in the "User One" "table_row"
And "Agreed" "icon" should exist in the "This site policy" "table_row"
@ -129,8 +129,8 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I am on site homepage
And I navigate to "Users > Privacy and policies > User agreements" in site administration
And I click on "0 of 2" "link" in the "User Two" "table_row"
And "Not agreed" "icon" should exist in the "This site policy" "table_row"
And "Not agreed" "icon" should exist in the "This privacy policy" "table_row"
And "Consent not given" "icon" should exist in the "This site policy" "table_row"
And "Consent not given" "icon" should exist in the "This privacy policy" "table_row"
Scenario: Agree on behalf of another user as a manager, multiple policies, javascript off
Given I log in as "admin"
@ -149,20 +149,20 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I set the field "I agree to the This privacy policy" to "1"
And I press "Next"
And I navigate to "Users > Privacy and policies > User agreements" in site administration
And I click on "Not agreed, click to agree to \"This site policy\"" "link" in the "User One" "table_row"
Then I should see "Agree on behalf of the user"
And I click on "Consent not given; click to give consent on behalf of user for This site policy" "link" in the "User One" "table_row"
Then I should see "Give consent on behalf of user"
And I should see "User One"
And I should see "This site policy"
And I should see "I acknowledge that I have received the user's request to consent on the abovementioned policy on behalf of the user."
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
And I set the field "Remarks" to "Consent received from a parent"
And I press "Agree"
And "Agreed on behalf of" "icon" should exist in the "User One" "table_row"
And "Not agreed, click to agree to \"This privacy policy\"" "icon" should exist in the "User One" "table_row"
And I press "Give consent on behalf of user"
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
And "Consent not given; click to give consent on behalf of user for This privacy policy" "icon" should exist in the "User One" "table_row"
And I click on "1 of 2" "link" in the "User One" "table_row"
And "Agreed on behalf of" "icon" should exist in the "This site policy" "table_row"
And "Consent given on behalf of user" "icon" should exist in the "This site policy" "table_row"
And "Max Manager" "link" should exist in the "This site policy" "table_row"
And "Consent received from a parent" "text" should exist in the "This site policy" "table_row"
And "Not agreed" "icon" should exist in the "This privacy policy" "table_row"
And "Consent not given" "icon" should exist in the "This privacy policy" "table_row"
@javascript
Scenario: Agree on behalf of another user as a manager, multiple policies, javascript on
@ -182,20 +182,20 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I set the field "I agree to the This privacy policy" to "1"
And I press "Next"
And I navigate to "Users > Privacy and policies > User agreements" in site administration
And I click on "Not agreed, click to agree to \"This site policy\"" "link" in the "User One" "table_row"
Then I should see "Agree on behalf of the user"
And I click on "Consent not given; click to give consent on behalf of user for This site policy" "link" in the "User One" "table_row"
Then I should see "Give consent on behalf of user"
And I should see "User One"
And I should see "This site policy"
And I should see "I acknowledge that I have received the user's request to consent on the abovementioned policy on behalf of the user."
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
And I set the field "Remarks" to "Consent received from a parent"
And I press "Agree"
And "Agreed on behalf of" "icon" should exist in the "User One" "table_row"
And "Not agreed, click to agree to \"This privacy policy\"" "icon" should exist in the "User One" "table_row"
And I press "Give consent on behalf of user"
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
And "Consent not given; click to give consent on behalf of user for This privacy policy" "icon" should exist in the "User One" "table_row"
And I click on "1 of 2" "link" in the "User One" "table_row"
And "Agreed on behalf of" "icon" should exist in the "This site policy" "table_row"
And "Consent given on behalf of user" "icon" should exist in the "This site policy" "table_row"
And "Max Manager" "link" should exist in the "This site policy" "table_row"
And "Consent received from a parent" "text" should exist in the "This site policy" "table_row"
And "Not agreed" "icon" should exist in the "This privacy policy" "table_row"
And "Consent not given" "icon" should exist in the "This privacy policy" "table_row"
Scenario: Policies and agreements profile link visible for current user
Given I log in as "user1"
@ -247,15 +247,15 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I press "Continue"
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
And I click on "Not agreed" "link" in the "User One" "table_row"
Then I should see "Agree on behalf of the user"
And I click on "Consent not given" "link" in the "User One" "table_row"
Then I should see "Give consent on behalf of user"
And I should see "User One"
And I should see "This site policy"
And I should see "I acknowledge that I have received the user's request to consent on the abovementioned policy on behalf of the user."
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
And I set the field "Remarks" to "Consent received from a parent"
And I press "Agree"
And "Agreed on behalf of" "icon" should exist in the "User One" "table_row"
And I press "Give consent on behalf of user"
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
And "Max Manager" "link" should not exist in the "User One" "table_row"
And "Admin User" "link" should exist in the "User One" "table_row"
And "Consent received from a parent" "text" should exist in the "User One" "table_row"
And "Not agreed" "icon" should exist in the "User Two" "table_row"
And "Consent not given" "icon" should exist in the "User Two" "table_row"

View File

@ -175,7 +175,7 @@ Feature: Manage policies
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I open the action menu in "Policy1" "table_row"
And I click on "Set status to \"Active\"" "link" in the "Policy1" "table_row"
Then I should see "All users will be required to accept this new policy version to be able to use the site"
Then I should see "All users will be required to agree to this new policy version to be able to use the site."
And I press "Continue"
And the following should exist in the "tool-policy-managedocs-wrapper" table:
| Name | Policy status | Version | Agreements |
@ -195,13 +195,13 @@ Feature: Manage policies
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I open the action menu in "Policy1" "table_row"
And I click on "Set status to \"Inactive\"" "link" in the "Policy1" "table_row"
Then I should see "The policy will not apply until some version is made the current one"
Then I should see "You are about to inactivate policy"
And I press "Continue"
And the following should exist in the "tool-policy-managedocs-wrapper" table:
| Name | Policy status | Version | Agreements |
| Policy1 Site policy, All users | Inactive | v1 | 1 of 4 (25%) |
And I open the action menu in "Policy1" "table_row"
And I click on "Create a new \"Draft\"" "link" in the "Policy1" "table_row"
And I click on "Create a new draft" "link" in the "Policy1" "table_row"
And I set the field "Version" to "v2"
And I set the field "Name" to "Policy2"
And the field "status" matches value "0"
@ -238,7 +238,7 @@ Feature: Manage policies
And I click on "Set status to \"Inactive\"" "link" in the "Policy1" "table_row"
And I press "Continue"
And I open the action menu in "Policy1" "table_row"
And I click on "Create a new \"Draft\"" "link" in the "Policy1" "table_row"
And I click on "Create a new draft" "link" in the "Policy1" "table_row"
And I set the field "Version" to "v2"
And I set the field "Name" to "Policy2"
And I set the field "Active" to "1"