Files
moodle/course/format/weeks/tests/behat/current_week.feature
T
Sara Arjona 9096a1e1ac MDL-73859 behat: Fix random error highlighting week
The first week is only highlighted if course starts today or
later. So, the course will be created with startdate on
yesterday to guarantee it always passes.
2022-02-15 17:43:12 +01:00

20 lines
937 B
Gherkin

@format @format_weeks
Feature: The current week should be highlighted in the course.
In order to know which is the current week
As a user
I need to see the current week highlighted
Scenario: Highlight first week
Given the following "courses" exist:
| fullname | shortname | format | coursedisplay | numsections | startdate |
| Course 1 | C1 | weeks | 0 | 5 | ##yesterday## |
When I am on the "C1" "Course" page logged in as "admin"
Then I should see "This week" in the "#section-1" "css_element"
Scenario: Highlight next week
Given the following "courses" exist:
| fullname | shortname | format | coursedisplay | numsections | startdate |
| Course 1 | C1 | weeks | 0 | 5 | ##monday last week## |
When I am on the "C1" "Course" page logged in as "admin"
Then I should see "This week" in the "#section-2" "css_element"