|
| 1 | +Feature: Chat tool |
| 2 | + In order to communicate with other users |
| 3 | + Teachers and students should be able to send public and private chat messages |
| 4 | + |
| 5 | + |
| 6 | + Scenario: Admin sends public and private messages, Andrea checks them |
| 7 | + Given I am a platform administrator |
| 8 | + And I am on course "TEMP" homepage |
| 9 | + And I wait for the page to be loaded |
| 10 | + And I zoom out to maximum |
| 11 | + Then I follow "Chat" |
| 12 | + And wait for the page to be loaded |
| 13 | + # Send a public message as admin |
| 14 | + Then I fill in the following: |
| 15 | + | chat-writer | I am USER1 | |
| 16 | + Then I click the "button#chat-send-message" element |
| 17 | + And wait for the page to be loaded |
| 18 | + |
| 19 | + |
| 20 | + # Open private chat with Andrea and send a private message |
| 21 | + Then I click the "button#andrea_costea_chat" element |
| 22 | + And wait for the page to be loaded |
| 23 | + Then I fill in the following: |
| 24 | + | chat-writer | HelloAndrea | |
| 25 | + Then I click the "button#chat-send-message" element |
| 26 | + And wait for the page to be loaded |
| 27 | + |
| 28 | + |
| 29 | + Scenario: Now switch to Andrea (student) and verify messages |
| 30 | + Given I am a student |
| 31 | + And I am on course "TEMP" homepage |
| 32 | + And I wait for the page to be loaded |
| 33 | + And I zoom out to maximum |
| 34 | + Then I follow "Chat" |
| 35 | + And wait for the page to be loaded |
| 36 | + Then I should see "USER1" |
| 37 | + Then I should not see "Hello" |
| 38 | + |
| 39 | + |
| 40 | + # Click on another user (john_doe) and assert a message |
| 41 | + Then I click the "button#john_doe_chat" element |
| 42 | + And wait for the page to be loaded |
| 43 | + Then I should see "Hello" |
0 commit comments