MDL-67599 behat: fix behat tests assuming Jan 2020 is a future date

This commit is contained in:
Jake Dallimore 2020-01-02 10:28:14 +08:00
parent 7850f76a93
commit 00444b07c7
6 changed files with 36 additions and 36 deletions

View File

@ -142,11 +142,11 @@ Feature: Assign group override
| id_cutoffdate_enabled | 1 |
| cutoffdate[day] | 1 |
| cutoffdate[month] | January |
| cutoffdate[year] | 2020 |
| cutoffdate[year] | 2030 |
| cutoffdate[hour] | 08 |
| cutoffdate[minute] | 00 |
And I press "Save"
And I should see "Wednesday, 1 January 2020, 8:00"
And I should see "Tuesday, 1 January 2030, 8:00"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
@ -169,7 +169,7 @@ Feature: Assign group override
| id_cutoffdate_enabled | 0 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2020 |
| allowsubmissionsfromdate[year] | 2030 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save and display"
@ -189,13 +189,13 @@ Feature: Assign group override
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
Then I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00"
Then I should see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00"
And I should not see "Add submission"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should not see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00"
And I should not see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00"
@javascript
Scenario: Add both a user and group override and verify that both are applied correctly
@ -209,7 +209,7 @@ Feature: Assign group override
| id_cutoffdate_enabled | 0 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2030 |
| allowsubmissionsfromdate[year] | 2040 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save and display"
@ -220,11 +220,11 @@ Feature: Assign group override
| id_allowsubmissionsfromdate_enabled | 1 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2020 |
| allowsubmissionsfromdate[year] | 2030 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save"
And I should see "Wednesday, 1 January 2020, 8:00"
And I should see "Tuesday, 1 January 2030, 8:00"
And I follow "Test assignment name"
And I navigate to "User overrides" in current page administration
And I press "Add user override"
@ -233,26 +233,26 @@ Feature: Assign group override
| id_allowsubmissionsfromdate_enabled | 1 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2021 |
| allowsubmissionsfromdate[year] | 2031 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save"
And I should see "Friday, 1 January 2021, 8:00"
And I should see "Wednesday, 1 January 2031, 8:00"
And I log out
Then I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "This assignment will accept submissions from Friday, 1 January 2021, 8:00"
And I should see "This assignment will accept submissions from Wednesday, 1 January 2031, 8:00"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00"
And I should see "This assignment will accept submissions from Sunday, 1 January 2040, 8:00"
And I log out
And I log in as "student3"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00"
And I should see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00"
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:

View File

@ -135,11 +135,11 @@ Feature: Assign user override
| id_cutoffdate_enabled | 1 |
| cutoffdate[day] | 1 |
| cutoffdate[month] | January |
| cutoffdate[year] | 2020 |
| cutoffdate[year] | 2030 |
| cutoffdate[hour] | 08 |
| cutoffdate[minute] | 00 |
And I press "Save"
And I should see "Wednesday, 1 January 2020, 8:00"
And I should see "Tuesday, 1 January 2030, 8:00"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
@ -163,7 +163,7 @@ Feature: Assign user override
| id_cutoffdate_enabled | 0 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2020 |
| allowsubmissionsfromdate[year] | 2030 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save and display"
@ -183,12 +183,12 @@ Feature: Assign user override
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
Then I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00"
Then I should see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should not see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00"
And I should not see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00"
Scenario: Override a user 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:

View File

@ -123,11 +123,11 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[year] | 2030 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save"
And I should see "Wednesday, 1 January 2020, 8:00"
And I should see "Tuesday, 1 January 2030, 8:00"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And I should see "In review" in the "I'm the student's first submission" "table_row"

View File

@ -28,7 +28,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson
| Description | Test lesson description |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[year] | 2030 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display"
@ -43,7 +43,7 @@ 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 Wednesday, 1 January 2020, 8:00"
Then I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00"
And I should not see "First page contents"
Scenario: Forbidding lesson accesses until a specified date

View File

@ -207,7 +207,7 @@ Feature: Lesson group override
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[year] | 2030 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save"
@ -233,7 +233,7 @@ Feature: Lesson group override
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[year] | 2030 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display"
@ -253,7 +253,7 @@ Feature: Lesson group override
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 Wednesday, 1 January 2020, 8:00"
Then I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00"
And I should not see "Cat is an amphibian"
And I log out
And I log in as "student1"
@ -312,7 +312,7 @@ Feature: Lesson group override
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2030 |
| available[year] | 2040 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display"
@ -324,11 +324,11 @@ Feature: Lesson group override
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[year] | 2030 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save"
And I should see "Wednesday, 1 January 2020, 8:00"
And I should see "Tuesday, 1 January 2030, 8:00"
And I follow "Test lesson name"
And I navigate to "User overrides" in current page administration
And I press "Add user override"
@ -337,26 +337,26 @@ Feature: Lesson group override
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2021 |
| available[year] | 2031 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save"
And I should see "Friday, 1 January 2021, 8:00"
And I should see "Wednesday, 1 January 2031, 8:00"
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 Friday, 1 January 2021, 8:00"
And I should see "This lesson will be open on Wednesday, 1 January 2031, 8:00"
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 Tuesday, 1 January 2030, 8:00"
And I should see "This lesson will be open on Sunday, 1 January 2040, 8:00"
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 Wednesday, 1 January 2020, 8:00"
And I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00"
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:

View File

@ -201,7 +201,7 @@ Feature: Lesson user override
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[year] | 2030 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save"
@ -228,7 +228,7 @@ Feature: Lesson user override
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[year] | 2030 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display"
@ -248,7 +248,7 @@ Feature: Lesson user override
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 Wednesday, 1 January 2020, 8:00"
Then I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00"
And I should not see "Cat is an amphibian"
And I log out
And I log in as "student1"