From 46b9a5c49ca38c1ca10882b50222b6d52aa1d2f1 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 15 Nov 2018 07:33:30 +0800 Subject: [PATCH] MDL-53566 core: Make context freeze test compat with clean --- lib/tests/behat/locking.feature | 84 ++++++++++++++++----------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/lib/tests/behat/locking.feature b/lib/tests/behat/locking.feature index d6f19c89ce6..d886884f25e 100644 --- a/lib/tests/behat/locking.feature +++ b/lib/tests/behat/locking.feature @@ -40,55 +40,55 @@ Feature: Context freezing apply to child contexts Given I log in as "admin" And I am on "courseaa1" course homepage And I follow "faa1" - And I should see "Add a new discussion topic" + And "Add a new discussion topic" "button" should exist When I follow "Freeze this context" And I click on "Continue" "button" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage Then I should see "Turn editing on" When I follow "faa1b" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseaa2" course homepage Then I should see "Turn editing on" When I follow "faa2" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseb" course homepage Then I should see "Turn editing on" When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist And I log out When I log in as "teacher" And I am on "courseaa1" course homepage And I follow "faa1" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage Then I should see "Turn editing on" When I follow "faa1b" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseaa2" course homepage Then I should see "Turn editing on" When I follow "faa2" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseb" course homepage Then I should see "Turn editing on" When I follow "fb" - Then I should see "Add a new discussion topic" + And "Add a new discussion topic" "button" should exist And I log out When I log in as "student1" And I am on "courseaa1" course homepage And I follow "faa1" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage When I follow "faa1b" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseaa2" course homepage When I follow "faa2" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseb" course homepage When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist Scenario: Freeze course should freeze all children Given I log in as "admin" @@ -97,54 +97,54 @@ Feature: Context freezing apply to child contexts When I follow "Freeze this context" And I click on "Continue" "button" Then I should not see "Turn editing on" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage Then I should not see "Turn editing on" - And I should see "Unfreeze this context" + And "Unfreeze this context" "link" should exist in current page administration When I follow "faa1b" - Then I should not see "Add a new discussion topic" - And I should not see "Unfreeze this context" + Then "Add a new discussion topic" "button" should not exist + And "Unfreeze this context" "link" should not exist in current page administration When I am on "courseaa2" course homepage Then I should see "Turn editing on" When I follow "faa2" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseb" course homepage Then I should see "Turn editing on" When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist And I log out When I log in as "teacher" And I am on "courseaa1" course homepage And I follow "faa1" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage Then I should not see "Turn editing on" When I follow "faa1b" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa2" course homepage Then I should see "Turn editing on" When I follow "faa2" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseb" course homepage Then I should see "Turn editing on" When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist And I log out When I log in as "student1" And I am on "courseaa1" course homepage And I follow "faa1" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage When I follow "faa1b" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa2" course homepage When I follow "faa2" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist When I am on "courseb" course homepage When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist Scenario: Freeze course category should freeze all children Given I log in as "admin" @@ -153,53 +153,53 @@ Feature: Context freezing apply to child contexts And I click on "Continue" "button" And I am on "courseaa1" course homepage And I should not see "Turn editing on" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage Then I should not see "Turn editing on" - And I should not see "Unfreeze this context" + And "Unfreeze this context" "link" should not exist in current page administration When I follow "faa1b" - Then I should not see "Add a new discussion topic" - And I should not see "Unfreeze this context" + Then "Add a new discussion topic" "button" should not exist + And "Unfreeze this context" "link" should not exist in current page administration When I am on "courseaa2" course homepage Then I should not see "Turn editing on" When I follow "faa2" - Then I should not see "Add a new discussion topic" - And I should not see "Unfreeze this context" + Then "Add a new discussion topic" "button" should not exist + And "Unfreeze this context" "link" should not exist in current page administration When I am on "courseb" course homepage Then I should see "Turn editing on" When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist And I log out When I log in as "teacher" And I am on "courseaa1" course homepage Then I should not see "Turn editing on" And I follow "faa1" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage Then I should not see "Turn editing on" When I follow "faa1b" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa2" course homepage Then I should not see "Turn editing on" When I follow "faa2" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseb" course homepage Then I should see "Turn editing on" When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist And I log out When I log in as "student1" And I am on "courseaa1" course homepage And I follow "faa1" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa1" course homepage When I follow "faa1b" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseaa2" course homepage When I follow "faa2" - Then I should not see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should not exist When I am on "courseb" course homepage When I follow "fb" - Then I should see "Add a new discussion topic" + Then "Add a new discussion topic" "button" should exist