Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_message @javascriptFeature: Message send messagesIn order to communicate with fellow usersAs a userI need to be able to send a messageBackground:Given the following "courses" exist:| fullname | shortname | category | groupmode || Course 1 | C1 | 0 | 1 |And the following "users" exist:| username | firstname | lastname | email || student1 | Student | 1 | student1@example.com || student2 | Student | 2 | student2@example.com |And the following "course enrolments" exist:| user | course | role || student1 | C1 | student || student2 | C1 | student |And the following "groups" exist:| name | course | idnumber | enablemessaging || Group 1 | C1 | G1 | 1 |And the following "group members" exist:| user | group || student1 | G1 || student2 | G1 |And the following config values are set as admin:| messaging | 1 || messagingminpoll | 1 |Scenario: Send a message to a group conversationGiven I log in as "student1"And I open messagingAnd I open the "Group" conversations listAnd "Group 1" "core_message > Message" should existAnd I select "Group 1" conversation in messagingWhen I send "Hi!" message in the message areaThen I should see "Hi!" in the "Group 1" "core_message > Message conversation"And I should see "##today##%d %B##" in the "Group 1" "core_message > Message conversation"And I log outAnd I log in as "student2"And I open messagingAnd "Group 1" "core_message > Message" should existAnd I select "Group 1" conversation in messagingAnd I should see "Hi!" in the "Group 1" "core_message > Message conversation"Scenario: Send a message to a starred conversationGiven I log in as "student1"When I open messagingAnd I open the "Group" conversations listThen "Group 1" "core_message > Message" should existAnd I select "Group 1" conversation in the "group-messages" conversations listAnd I open contact menuAnd I click on "Star conversation" "link" in the "conversation-actions-menu" "region"And I go back in "view-conversation" message drawerAnd I open the "Starred" conversations listAnd I should see "Group 1"And I select "Group 1" conversation in the "favourites" conversations listAnd I send "Hi!" message in the message areaAnd I should see "Hi!" in the "Group 1" "core_message > Message conversation"And I should see "##today##%d %B##" in the "Group 1" "core_message > Message conversation"And I go back in "view-conversation" message drawerAnd I open the "Group" conversations listAnd I should not see "Group 1" in the "Group" "core_message > Message tab"Scenario: Send a message to a private conversation via contact tabGiven the following "message contacts" exist:| user | contact || student1 | student2 |And I log in as "student1"And I open messagingAnd I click on "Contacts" "link"And I click on "Student 2" "link" in the "//*[@data-section='contacts']" "xpath_element"When I send "Hi!" message in the message areaThen I should see "Hi!" in the "Student 2" "core_message > Message conversation"And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"Scenario: Try to send a message to a private conversation is not contact but you are allowed to send a messageGiven I log in as "student1"And I open messagingWhen I send "Hi!" message to "Student 2" userThen I should see "Hi!" in the "Student 2" "core_message > Message conversation"And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"And I log outAnd I log in as "student2"And I open messagingAnd I select "Student 1" conversation in messagingAnd I should see "Hi!" in the "Student 1" "core_message > Message conversation"