diff --git a/mod/lesson/tests/behat/date_availability.feature b/mod/lesson/tests/behat/date_availability.feature index c1b0ebac036..52816ec3c87 100644 --- a/mod/lesson/tests/behat/date_availability.feature +++ b/mod/lesson/tests/behat/date_availability.feature @@ -45,10 +45,10 @@ Feature: A teacher can set available from and deadline dates to access a lesson And I log in as "student1" And I am on "Course 1" course homepage When I follow "Test lesson" - Then I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00" + Then the activity date in "Test lesson" should contain "Opens: 1 January 2030, 8:00 AM" And I should not see "First page contents" - Scenario: Forbidding lesson accesses until a specified date + Scenario: Forbidding lesson accesses after a specified date Given the following "activities" exist: | activity | name | intro | course | section | idnumber | | lesson | Test lesson | Test lesson description | C1 | 1 | lesson1 | @@ -74,5 +74,5 @@ Feature: A teacher can set available from and deadline dates to access a lesson And I log in as "student1" And I am on "Course 1" course homepage When I follow "Test lesson" - Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" + Then the activity date in "Test lesson" should contain "Closed: 1 January 2000, 8:00 AM" And I should not see "First page contents" diff --git a/mod/lesson/tests/behat/lesson_group_override.feature b/mod/lesson/tests/behat/lesson_group_override.feature index b5bcf89df1f..5d3c03f4802 100644 --- a/mod/lesson/tests/behat/lesson_group_override.feature +++ b/mod/lesson/tests/behat/lesson_group_override.feature @@ -215,13 +215,13 @@ Feature: Lesson group override And I log out And I log in as "student2" And I am on "Course 1" course homepage - And I follow "Test lesson" - Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" + And I follow "Test lesson name" + Then the activity date in "Test lesson name" should contain "Closed: 1 January 2000, 8:00 AM" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" And I am on "Course 1" course homepage - And I follow "Test lesson" + And I follow "Test lesson name" And I should see "Cat is an amphibian" Scenario: Allow a group to have a different start date @@ -252,13 +252,13 @@ Feature: Lesson group override And I log out And I log in as "student2" And I am on "Course 1" course homepage - And I follow "Test lesson" - Then I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00" + And I follow "Test lesson name" + Then the activity date in "Test lesson name" should contain "Opens: 1 January 2030, 8:00 AM" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" And I am on "Course 1" course homepage - And I follow "Test lesson" + And I follow "Test lesson name" And I should see "Cat is an amphibian" Scenario: Allow a single group to have multiple attempts at each question @@ -345,18 +345,18 @@ Feature: Lesson group override And I log out Then I log in as "student1" And I am on "Course 1" course homepage - And I follow "Test lesson" - And I should see "This lesson will be open on Wednesday, 1 January 2031, 8:00" + And I follow "Test lesson name" + And the activity date in "Test lesson name" should contain "Opens: 1 January 2031, 8:00 AM" And I log out And I log in as "student2" And I am on "Course 1" course homepage - And I follow "Test lesson" - And I should see "This lesson will be open on Sunday, 1 January 2040, 8:00" + And I follow "Test lesson name" + And the activity date in "Test lesson name" should contain "Opens: 1 January 2040, 8:00 AM" And I log out And I log in as "student3" And I am on "Course 1" course homepage - And I follow "Test lesson" - And I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00" + And I follow "Test lesson name" + And the activity date in "Test lesson name" should contain "Opens: 1 January 2030, 8:00 AM" Scenario: Override a group when teacher is in no group, and does not have accessallgroups permission, and the activity's group mode is 'separate groups' Given the following "permission overrides" exist: diff --git a/mod/lesson/tests/behat/lesson_user_override.feature b/mod/lesson/tests/behat/lesson_user_override.feature index e33b5b4ff98..c738d3aebed 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -209,14 +209,14 @@ Feature: Lesson user override And I log out And I log in as "student2" And I am on "Course 1" course homepage - And I follow "Test lesson" + And I follow "Test lesson name" And I wait until the page is ready - Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" + Then the activity date in "Test lesson name" should contain "Closed: 1 January 2000, 8:00 AM" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" And I am on "Course 1" course homepage - And I follow "Test lesson" + And I follow "Test lesson name" And I should see "Cat is an amphibian" @javascript @@ -248,14 +248,14 @@ Feature: Lesson user override And I log out And I log in as "student2" And I am on "Course 1" course homepage - And I follow "Test lesson" + And I follow "Test lesson name" And I wait until the page is ready - Then I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00" + Then the activity date in "Test lesson name" should contain "Opens: 1 January 2030, 8:00 AM" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" And I am on "Course 1" course homepage - And I follow "Test lesson" + And I follow "Test lesson name" And I should see "Cat is an amphibian" @javascript