forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-77252-master' of https://github.com/davewoloszyn/mo…
- Loading branch information
Showing
5 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
communication/provider/matrix/tests/behat/matrix_room_banner.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@communication @communication_matrix | ||
Feature: Display communication room status banner | ||
Show a banner depending on the room status | ||
As a teacher or admin | ||
|
||
Background: | ||
Given a Matrix mock server is configured | ||
And the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
| student1 | Student | 1 | student1@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | category | selectedcommunication | communicationroomname | | ||
| Test course | Test course | 0 | communication_matrix | matrixroom | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | Test course | editingteacher | | ||
| student1 | Test course | student | | ||
|
||
Scenario: I can see the room has been created and in a pending status | ||
When I am on the "Test course" "Course" page logged in as "teacher1" | ||
Then I should see "Your Matrix room will be ready soon." in the "page-content" "region" | ||
When I am on the "Test course" "Course" page logged in as "student1" | ||
# Not for students to see. | ||
Then I should not see "Your Matrix room will be ready soon." in the "page-content" "region" | ||
|
||
Scenario: I can see the room has been created and ready to access | ||
When I run all adhoc tasks | ||
And I am on the "Test course" "Course" page logged in as "teacher1" | ||
Then I should see "Your Matrix room is ready!" in the "page-content" "region" | ||
# This is a one time message per user. | ||
When I reload the page | ||
Then I should not see "Your Matrix room is ready!" in the "page-content" "region" | ||
# Not for students to see. | ||
When I am on the "Test course" "Course" page logged in as "student1" | ||
Then I should not see "Your Matrix room is ready!" in the "page-content" "region" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters