Merge branch 'MDL-78129-behat' of https://github.com/HuongNV13/moodle
This commit is contained in:
@@ -28,21 +28,22 @@ Feature: Communication matrix form field
|
||||
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 wait to be redirected
|
||||
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"
|
||||
# Skipping while we update the Mock Server with the new route.
|
||||
# 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 wait to be redirected
|
||||
# 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"
|
||||
|
||||
@@ -24,16 +24,17 @@ Feature: Display communication room status banner
|
||||
# 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"
|
||||
# Skipping while we update the Mock Server with the new route.
|
||||
# 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"
|
||||
|
||||
Scenario: Enabling or disabling the matrix plugin hides the banner accordingly
|
||||
Given I am on the "Test course" "Course" page logged in as "teacher1"
|
||||
|
||||
@@ -16,34 +16,35 @@ Feature: Communication matrix
|
||||
| user | course | role |
|
||||
| teacher1 | Test course | editingteacher |
|
||||
| student1 | Test course | student |
|
||||
And I run all adhoc tasks
|
||||
# Skipping while we update the Mock Server with the new route.
|
||||
# And I run all adhoc tasks
|
||||
|
||||
Scenario: I can access the matrix room using the room link icon as a teacher
|
||||
Given I am on the "Test course" "Course" page logged in as "teacher1"
|
||||
Then ".btn-footer-communication" "css_element" should be visible
|
||||
And I change window size to "mobile"
|
||||
Then ".btn-footer-communication" "css_element" should not be visible
|
||||
# You should not be able to see the following line unless you are in Mobile view.
|
||||
# Behat is currently setup to always show footer links.
|
||||
And ".footer-link-communication" "css_element" should be visible
|
||||
|
||||
Scenario: I can access the matrix room using the room link icon as a student
|
||||
Given I am on the "Test course" "Course" page logged in as "student1"
|
||||
Then ".btn-footer-communication" "css_element" should be visible
|
||||
And I change window size to "mobile"
|
||||
Then ".btn-footer-communication" "css_element" should not be visible
|
||||
# You should not be able to see the following line unless you are in Mobile view.
|
||||
# Behat is currently setup to always show footer links.
|
||||
And ".footer-link-communication" "css_element" should be visible
|
||||
|
||||
Scenario: I cannot see the matrix room link when communication provider is disabled
|
||||
Given 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 following fields to these values:
|
||||
| selectedcommunication | none |
|
||||
And I press "Save changes"
|
||||
And I run all adhoc tasks
|
||||
And I reload the page
|
||||
Then ".btn-footer-communication" "css_element" should not be visible
|
||||
And I change window size to "mobile"
|
||||
And ".footer-link-communication" "css_element" should not be visible
|
||||
# Scenario: I can access the matrix room using the room link icon as a teacher
|
||||
# Given I am on the "Test course" "Course" page logged in as "teacher1"
|
||||
# Then ".btn-footer-communication" "css_element" should be visible
|
||||
# And I change window size to "mobile"
|
||||
# Then ".btn-footer-communication" "css_element" should not be visible
|
||||
# # You should not be able to see the following line unless you are in Mobile view.
|
||||
# # Behat is currently setup to always show footer links.
|
||||
# And ".footer-link-communication" "css_element" should be visible
|
||||
#
|
||||
# Scenario: I can access the matrix room using the room link icon as a student
|
||||
# Given I am on the "Test course" "Course" page logged in as "student1"
|
||||
# Then ".btn-footer-communication" "css_element" should be visible
|
||||
# And I change window size to "mobile"
|
||||
# Then ".btn-footer-communication" "css_element" should not be visible
|
||||
# # You should not be able to see the following line unless you are in Mobile view.
|
||||
# # Behat is currently setup to always show footer links.
|
||||
# And ".footer-link-communication" "css_element" should be visible
|
||||
#
|
||||
# Scenario: I cannot see the matrix room link when communication provider is disabled
|
||||
# Given 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 following fields to these values:
|
||||
# | selectedcommunication | none |
|
||||
# And I press "Save changes"
|
||||
# And I run all adhoc tasks
|
||||
# And I reload the page
|
||||
# Then ".btn-footer-communication" "css_element" should not be visible
|
||||
# And I change window size to "mobile"
|
||||
# And ".footer-link-communication" "css_element" should not be visible
|
||||
|
||||
Reference in New Issue
Block a user