Skip to content

Commit

Permalink
MDL-62796 tool_policy: Fix a regression in Behat test
Browse files Browse the repository at this point in the history
We now correctly show the popup with links to policies that apply to
anonymous visitors of the site. So the name of the guests only policy
became visible in this popup in more cases and it caused false failures.

The point of the lines affected by this patch is to make sure that the
policy does / does not appear in the list of policies to be accepted. So
I am making it more specific of where the text is / is not supposed to
be seen.
  • Loading branch information
mudrd8mz committed Jul 3, 2018
1 parent 483d8fe commit 4cdd9e7
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions admin/tool/policy/tests/behat/consent.feature
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And I am on site homepage
And I follow "Log in"
When I press "Create new account"
Then I should see "This site policy"
Then I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should see "full text2"
And I press "Next"
And I should see "Please agree to the following policies"
And I should see "This site policy"
And I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should not see "full text2"
And I set the field "I agree to the This site policy" to "1"
Expand Down Expand Up @@ -129,22 +129,22 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And I am on site homepage
And I follow "Log in"
When I press "Create new account"
Then I should see "This site policy"
Then I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should see "full text2"
And I press "Next"
And I should see "This privacy policy"
And I should see "This privacy policy" in the "region-main" "region"
And I should see "short text3"
And I should see "full text3"
And I press "Next"
And I should see "Please agree to the following policies"
And I should see "This site policy"
And I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should not see "full text2"
And I should see "This privacy policy"
And I should see "This privacy policy" in the "region-main" "region"
And I should see "short text3"
And I should not see "full text3"
And I should not see "This guests policy"
And I should not see "This guests policy" in the "region-main" "region"
And I should not see "short text4"
And I should not see "full text4"
And I set the field "I agree to the This site policy" to "1"
Expand Down Expand Up @@ -495,20 +495,20 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And I am on site homepage
And I follow "Log in"
When I press "Create new account"
Then I should see "This site policy"
Then I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should see "full text2"
When I press "Next"
Then I should see "This privacy policy"
Then I should see "This privacy policy" in the "region-main" "region"
And I should see "short text3"
And I should see "full text3"
When I press "Next"
Then I should see "Please agree to the following policies"
And I should see "This site policy"
And I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should see "This privacy policy"
And I should see "This privacy policy" in the "region-main" "region"
And I should see "short text3"
And I should not see "This guests policy"
And I should not see "This guests policy" in the "region-main" "region"
And I should not see "short text4"
And I set the field "I agree to the This site policy" to "1"
And I set the field "I agree to the This privacy policy" to "1"
Expand All @@ -528,22 +528,22 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And I follow "Log in"
When I press "Create new account"
# Confirm that the user can view and accept policies when attempting to create another account.
Then I should see "This site policy"
Then I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should see "full text2"
When I press "Next"
Then I should see "This privacy policy"
Then I should see "This privacy policy" in the "region-main" "region"
And I should see "short text3"
And I should see "full text3"
When I press "Next"
Then I should see "Please agree to the following policies"
And I should see "This site policy"
And I should see "This site policy" in the "region-main" "region"
And I should see "short text2"
And I should not see "full text2"
And I should see "This privacy policy"
And I should see "This privacy policy" in the "region-main" "region"
And I should see "short text3"
And I should not see "full text3"
And I should not see "This guests policy"
And I should not see "This guests policy" in the "region-main" "region"
And I should not see "short text4"
And I should not see "full text4"
And I set the field "I agree to the This site policy" to "1"
Expand Down

0 comments on commit 4cdd9e7

Please sign in to comment.