Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MDL-62354 tool_policy: Reflect the strings improvements in Behat tests
  • Loading branch information
mudrd8mz committed May 9, 2018
1 parent a559161 commit 14e0ab3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
78 changes: 39 additions & 39 deletions admin/tool/policy/tests/behat/acceptances.feature
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -119,18 +119,18 @@ 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"
And "Agreed" "icon" should exist in the "This privacy policy" "table_row"
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"
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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"
8 changes: 4 additions & 4 deletions admin/tool/policy/tests/behat/managepolicies.feature
Expand Up @@ -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 |
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 14e0ab3

Please sign in to comment.