Browse Source

Notifications level is not in the sidebar anymore

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/6338/head
Joas Schilling 4 years ago
parent
commit
3ea57b7f78
No known key found for this signature in database GPG Key ID: 7076EA9751AACDDA
  1. 31
      src/components/LeftSidebar/ConversationsList/Conversation.spec.js

31
src/components/LeftSidebar/ConversationsList/Conversation.spec.js

@ -44,7 +44,6 @@ describe('Conversation.vue', () => {
type: CONVERSATION.TYPE.GROUP,
displayName: 'conversation one',
isFavorite: false,
notificationLevel: 0,
lastMessage: {
actorId: 'user-id-alice',
actorDisplayName: 'Alice Wonderland',
@ -418,36 +417,6 @@ describe('Conversation.vue', () => {
expect(wrapper.emitted().click).toBeTruthy()
})
describe('notification level', () => {
/**
* @param {string} actionName The label of the notification level to select
* @param {number} level The notification level to select
*/
async function testSetNotificationLevel(actionName, level) {
const setNotificationLevelAction = jest.fn().mockResolvedValueOnce()
testStoreConfig.modules.conversationsStore.actions.setNotificationLevel = setNotificationLevelAction
const action = shallowMountAndGetAction(actionName)
expect(action.exists()).toBe(true)
await action.find('button').trigger('click')
expect(setNotificationLevelAction).toHaveBeenCalledWith(expect.anything(), { token: TOKEN, notificationLevel: level })
}
test('sets notification to all messages', async () => {
await testSetNotificationLevel('All messages', 1)
})
test('sets notification to at-mentions only', async () => {
await testSetNotificationLevel('@-mentions only', 2)
})
test('sets notification to off', async () => {
await testSetNotificationLevel('Off', 3)
})
})
describe('leaving conversation', () => {
test('leaves conversation', async () => {
const actionHandler = jest.fn()

Loading…
Cancel
Save