From d80fbaaca6a67c1b1b7f009ee2203844901fd423 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 26 Jul 2018 14:49:04 +0800 Subject: [PATCH 1/4] MDL-62950 behat: Correct path to P&P --- admin/tool/policy/tests/behat/consent.feature | 4 ++-- auth/tests/behat/validateagedigitalconsentmap.feature | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/tool/policy/tests/behat/consent.feature b/admin/tool/policy/tests/behat/consent.feature index 6c504eb9c8a..6a5f4c0cd3c 100644 --- a/admin/tool/policy/tests/behat/consent.feature +++ b/admin/tool/policy/tests/behat/consent.feature @@ -364,7 +364,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign And I log out # Create new policy document. And I log in as "admin" - And I navigate to "Manage policies" node in "Site administration > Privacy and policies" + And I navigate to "Manage policies" node in "Site administration > Users > Privacy and policies" And I should see "Policies and agreements" And I should see "New policy" And I follow "New policy" @@ -419,7 +419,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign And I log out # Create new version of the policy document. And I log in as "admin" - And I navigate to "Manage policies" node in "Site administration > Privacy and policies" + And I navigate to "Manage policies" node in "Site administration > Users > Privacy and policies" When I follow "Actions" Then I should see "View" And I should see "Edit" diff --git a/auth/tests/behat/validateagedigitalconsentmap.feature b/auth/tests/behat/validateagedigitalconsentmap.feature index 9fe1753e427..7381991045f 100644 --- a/auth/tests/behat/validateagedigitalconsentmap.feature +++ b/auth/tests/behat/validateagedigitalconsentmap.feature @@ -6,7 +6,7 @@ Feature: Test validation of 'Age of digital consent' setting. Background: Given I log in as "admin" - And I navigate to "Privacy settings" node in "Site administration > Privacy and policies" + And I navigate to "Privacy settings" node in "Site administration > Users > Privacy and policies" Scenario: Admin provides valid value for 'Age of digital consent'. Given I set the field "s__agedigitalconsentmap" to multiline: From 49f427de13293f8d6dd3cb14a6ed7c3ab9c3f334 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 26 Jul 2018 14:56:35 +0800 Subject: [PATCH 2/4] MDL-62950 behat: Correct use of nav --- user/tests/behat/view_participants.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/tests/behat/view_participants.feature b/user/tests/behat/view_participants.feature index 5c6d4f80cdb..9ec26e41e07 100644 --- a/user/tests/behat/view_participants.feature +++ b/user/tests/behat/view_participants.feature @@ -270,7 +270,7 @@ Feature: View course participants Given I log in as "admin" And I am on "Course 1" course homepage And I navigate to course participants - When I navigate to "Enrolment methods" in current page administration + When I navigate to "Users > Enrolment methods" in current page administration And I click on "Disable" "link" in the "Manual enrolments" "table_row" Then I navigate to course participants And I should see "Not current" in the "student0x" "table_row" From cc806faf185236acb789cf71b4b52895bd1e4527 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 26 Jul 2018 15:29:05 +0800 Subject: [PATCH 3/4] MDL-62950 behat: Correct navbar references --- auth/tests/behat/displayloginfailures.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/tests/behat/displayloginfailures.feature b/auth/tests/behat/displayloginfailures.feature index 50b9ec63c26..4b6e2a9d21e 100644 --- a/auth/tests/behat/displayloginfailures.feature +++ b/auth/tests/behat/displayloginfailures.feature @@ -25,11 +25,11 @@ Feature: Test the 'showlogfailures' feature works. And I set the field "Password" to "teacher1" And I press "Log in" # Confirm the notices are displayed. - Then I should see "1 failed logins since your last login" in the "nav.navbar" "css_element" + Then I should see "1 failed logins since your last login" in the ".navbar" "css_element" And I should see "1 failed logins since your last login" in the "page-footer" "region" # Confirm the notices disappear when navigating to another page. And I am on homepage - And I should not see "1 failed logins since your last login" in the "nav.navbar" "css_element" + And I should not see "1 failed logins since your last login" in the ".navbar" "css_element" And I should not see "1 failed logins since your last login" in the "page-footer" "region" # Given the user has at least one failed login attempt, when they login, then they should see both header and footer notices. @@ -46,10 +46,10 @@ Feature: Test the 'showlogfailures' feature works. And I set the field "Password" to "admin" And I press "Log in" # Confirm the notices are displayed. - Then I should see "1 failed logins since your last login" in the "nav.navbar" "css_element" + Then I should see "1 failed logins since your last login" in the ".navbar" "css_element" And I should see "1 failed logins since your last login (Logs)" in the "page-footer" "region" # Confirm that the link works and that the notices disappear when navigating to another page. And I click on "Logs" "link" in the "page-footer" "region" And I should see "User login failed" in the "table.reportlog" "css_element" - And I should not see "1 failed logins since your last login" in the "nav.navbar" "css_element" + And I should not see "1 failed logins since your last login" in the ".navbar" "css_element" And I should not see "1 failed logins since your last login (Logs)" in the "page-footer" "region" From 3f068cf38163128f060e2be4550442adef58ee71 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 27 Jul 2018 10:05:17 +0800 Subject: [PATCH 4/4] MDL-62950 behat: Disable editing for boost test --- backup/moodle2/tests/behat/import_multiple_times.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup/moodle2/tests/behat/import_multiple_times.feature b/backup/moodle2/tests/behat/import_multiple_times.feature index ccf6dd1713c..98d495f7b36 100644 --- a/backup/moodle2/tests/behat/import_multiple_times.feature +++ b/backup/moodle2/tests/behat/import_multiple_times.feature @@ -27,10 +27,10 @@ Feature: Import course's content's twice And I log in as "teacher1" Scenario: Import course's contents to another course - Given I am on "Course 2" course homepage with editing mode on + Given I am on "Course 2" course homepage And I should not see "Online users" And I should not see "Test quiz" - And I import "Course 1" course into "Course 2" course using this options: + And I import "Course 1" course into "Course 2" course using this options: And I am on "Course 2" course homepage And I should see "Online users" And I should see "Test quiz"