From dd808ec6b9e9335cf0cad8af892bbe1995392650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Tue, 3 Jul 2018 10:47:38 +0200 Subject: [PATCH] MDL-62796 tool_policy: Fix a regression in Behat test 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. --- admin/tool/policy/tests/behat/consent.feature | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/admin/tool/policy/tests/behat/consent.feature b/admin/tool/policy/tests/behat/consent.feature index fde43ccc0cb..6c504eb9c8a 100644 --- a/admin/tool/policy/tests/behat/consent.feature +++ b/admin/tool/policy/tests/behat/consent.feature @@ -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" @@ -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" @@ -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" @@ -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"