Skip to content

Commit

Permalink
MDL-81932 communication_matrix: Fix behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
safatshahin committed Jul 4, 2024
1 parent 0beb2ec commit c9887d8
Showing 1 changed file with 11 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@communication @communication_matrix @javascript
@communication @communication_matrix
Feature: Communication matrix form field
In order to create a new communication room in matrix
As a teacher
Expand All @@ -15,34 +15,20 @@ Feature: Communication matrix form field
| user | course | role |
| teacher1 | Test course | editingteacher |

Scenario: I can add room name for matrix room
@javascript
Scenario: I can add room name and topic for matrix room
Given a Matrix mock server is configured
And I log in as "teacher1"
And I am on "Test course" course homepage
And I am on the "Test course" "Course" page logged in as "teacher1"
When I navigate to "Communication" in current page administration
And I set the field "id_selectedcommunication" to "Matrix"
And I wait to be redirected
And I should see "Room name"
And I set the field "id_communicationroomname" to "Sampleroomname"
And I press "Save changes"
And I navigate to "Communication" in current page administration
Then the field "id_communicationroomname" matches value "Sampleroomname"

Scenario: I can add room topic for matrix room
Given a Matrix mock server is configured
And I log in as "teacher1"
And I am on "Test course" course homepage
When I navigate to "Communication" in current page administration
And I set the field "id_selectedcommunication" to "Matrix"
And I set the following fields to these values:
| selectedcommunication | communication_matrix |
And I wait to be redirected
And I set the following fields to these values:
| communication_matrixroomname | Sampleroomname |
| matrixroomtopic | Sampleroomtopic |
And I should see "Room name"
And I should see "Room topic"
And I set the field "id_communicationroomname" to "Sampleroomname"
And I set the field "id_matrixroomtopic" to "Sampleroomtopic"
And I press "Save changes"
And I navigate to "Communication" in current page administration
Then the field "id_communicationroomname" matches value "Sampleroomname"
And I press "Cancel"
And I run all adhoc tasks
And I navigate to "Communication" in current page administration
And the field "id_matrixroomtopic" matches value "Sampleroomtopic"
Then the field "Room name" matches value "Sampleroomname"
And the field "Room topic" matches value "Sampleroomtopic"

0 comments on commit c9887d8

Please sign in to comment.