Skip to content

Commit

Permalink
MDL-63282 core_message: Setting messagingallusers = 1 for behat tests
Browse files Browse the repository at this point in the history
Default setting value for new instances is 0
Default setting value for existing instances is 1
to get same search results than before this setting exists

Setting messagingallusers = 1 for behat tests to simulate old versions functionality

Followup: MDL-63911
  • Loading branch information
Amaia Anabitarte authored and mdjnelson committed Nov 8, 2018
1 parent 548cac7 commit 36e2398
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Feature: Message popover unread messages
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "student2"
And I send "Test message" message to "Student 1" user
And I log out
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/delete_all_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Feature: Delete all messages
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "user2"
And I send "User 2 to User 1 message 1" message to "User 1" user
And I send "User 2 to User 1 message 2" message in the message area
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/delete_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Feature: Delete messages
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "user2"
And I send "User 2 to User 1 message 1" message to "User 1" user
And I send "User 2 to User 1 message 2" message in the message area
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/manage_contacts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Feature: Manage contacts
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
| user3 | User | 3 | user3@example.com |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "admin"
And I set the following administration settings values:
| messagingallusers | 1 |
Expand Down
6 changes: 6 additions & 0 deletions message/tests/behat/reply_message.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ Feature: Reply message
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "user2"
And I send "User 2 to User 1" message to "User 1" user
And I log out
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/search_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Feature: Search messages
| user1 | C1 | student |
| user2 | C1 | student |
| user3 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "user2"
And I send "User 2 to User 1" message to "User 1" user
And I log out
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/search_users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Feature: Search users
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
| user3 | User | 3 | user3@example.com |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |

Scenario: Search for single user
When I log in as "user1"
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/update_messaging_preferences.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Feature: Messaging preferences
Given I log in as "admin"
And I navigate to "Plugins > Message outputs > Manage message outputs" in site administration
And I click on "//table[contains(@class, 'admintable')]/tbody/tr/td[contains(text(), 'Email')]/following-sibling::td[1]/a" "xpath_element"
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |

Scenario: Alter my message preferences
Given I follow "Preferences" in the user menu
Expand Down
3 changes: 3 additions & 0 deletions message/tests/behat/view_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Feature: View messages
| user1 | C1 | student |
| user2 | C1 | student |
| user3 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |
And I log in as "user2"
And I send "User 2 to User 1" message to "User 1" user
And I log out
Expand Down
3 changes: 3 additions & 0 deletions user/tests/behat/delete_users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Feature: Deleting users
| user2 | C1 | student |
| user3 | C1 | student |
| user4 | C1 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |

@javascript
Scenario: Deleting one user at a time
Expand Down
3 changes: 3 additions & 0 deletions user/tests/behat/view_full_profile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Feature: Access to full profiles of users
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
| student3 | C2 | student |
And the following config values are set as admin:
| messaging | 1 |
| messagingallusers | 1 |

Scenario: Viewing full profiles with default settings
When I log in as "student1"
Expand Down

0 comments on commit 36e2398

Please sign in to comment.