Skip to content

Commit

Permalink
Fix behat test in 4.4,
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed May 17, 2024
1 parent e952af6 commit 58d5684
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions tests/behat/calendar_features.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ Feature: Test the calendar related features in the attendance module
| course | C1 |
| idnumber | 00001 |
| name | Test attendance |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| calendar_month | Course | C1 | course-view-* | side-pre |
And I log in as "teacher1"

@javascript
Scenario: Calendar events can be created automatically with sessions creation
Given I am on "Course 1" course homepage with editing mode on
And I add the "Calendar" block
And I am on the "Test attendance" "mod_attendance > View" page
Given I am on the "Test attendance" "mod_attendance > View" page
And I click on "Add session" "button"
And I set the following fields to these values:
| id_sestime_starthour | 23 |
Expand All @@ -33,5 +34,5 @@ Feature: Test the calendar related features in the attendance module
| id_sestime_endminute | 55 |
And I click on "id_submitbutton" "button"
And I am on "Course 1" course homepage
And I click on "Full calendar" "link"
And I follow "Course calendar"
Then I should see "Test attendance"
8 changes: 5 additions & 3 deletions tests/behat/defaultstatus.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Feature: Admin can set default status set for use in new attendance
And the following "course enrolments" exist:
| course | user | role | timestart |
| C1 | teacher1 | editingteacher | ##yesterday## |
And the following "activity" exists:
| activity | attendance |
| course | C1 |
| idnumber | 00001 |
| name | Attendance1 |
And I log in as "admin"
And I navigate to "Plugins > Attendance" in site administration
And I follow "Default status set"
Expand All @@ -23,9 +28,6 @@ Feature: Admin can set default status set for use in new attendance
Scenario: Modified default status set added to new attendance

Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance1 |
And I am on the "Attendance1" "mod_attendance > View" page
And I click on "More" "link" in the ".secondary-navigation" "css_element"
And I select "Status set" from secondary navigation
Expand Down

0 comments on commit 58d5684

Please sign in to comment.