MDL-71163 mod_lesson: Fix behat failures

This commit is contained in:
Shamim Rezaie
2021-05-03 15:43:02 +02:00
committed by Sara Arjona
parent afb9462896
commit c91c2aa744
3 changed files with 21 additions and 21 deletions
@@ -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"
@@ -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:
@@ -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