Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@communication @communication_matrix
2
Feature: Display communication room status banner
3
  Show a banner depending on the room status
4
  As a teacher or admin
5
 
6
  Background:
7
    Given a Matrix mock server is configured
8
    And the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | 1        | teacher1@example.com |
11
      | student1 | Student   | 1        | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname    | shortname   | category | selectedcommunication | communicationroomname |
14
      | Test course | Test course | 0        | communication_matrix  | matrixroom            |
15
    And the following "course enrolments" exist:
16
      | user     | course      | role           |
17
      | teacher1 | Test course | editingteacher |
18
      | student1 | Test course | student        |
19
 
20
  Scenario: I can see the room has been created and in a pending status
21
    When I am on the "Test course" "Course" page logged in as "teacher1"
22
    Then I should see "Your Matrix room will be ready soon." in the "page-content" "region"
23
    When I am on the "Test course" "Course" page logged in as "student1"
24
    # Not for students to see.
25
    Then I should not see "Your Matrix room will be ready soon." in the "page-content" "region"
26
 
27
  Scenario: I can see the room has been created and ready to access
28
    When I run all adhoc tasks
29
    And I am on the "Test course" "Course" page logged in as "teacher1"
30
    Then I should see "Your Matrix room is ready." in the "page-content" "region"
31
    # This is a one time message per user.
32
    When I reload the page
33
    Then I should not see "Your Matrix room is ready." in the "page-content" "region"
34
    # Not for students to see.
35
    When I am on the "Test course" "Course" page logged in as "student1"
36
    Then I should not see "Your Matrix room is ready." in the "page-content" "region"
37
 
38
  Scenario: Enabling or disabling the matrix plugin hides the banner accordingly
39
    Given I am on the "Test course" "Course" page logged in as "teacher1"
40
    Then I should see "Your Matrix room will be ready soon." in the "page-content" "region"
41
    When I log in as "admin"
42
    And I navigate to "Plugins > Communication > Manage communication providers" in site administration
43
    And I should see "Matrix"
44
    And I click on "Disable" "link" in the "Matrix" "table_row"
45
    And I am on the "Test course" "Course" page logged in as "teacher1"
46
    And I should not see "Your Matrix room will be ready soon." in the "page-content" "region"
47
    And I log in as "admin"
48
    And I navigate to "Plugins > Communication > Manage communication providers" in site administration
49
    And I should see "Matrix"
50
    And I click on "Enable" "link" in the "Matrix" "table_row"
51
    And I am on the "Test course" "Course" page logged in as "teacher1"
52
    Then I should see "Your Matrix room will be ready soon." in the "page-content" "region"