Skip to content

Commit 4a9b3de

Browse files
committed
fixup! fix(search): apply layout-message-view when loading the next messages
1 parent f10db16 commit 4a9b3de

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/tests/unit/store/actions.spec.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ describe('Vuex store actions', () => {
204204
}
205205

206206
store.preferences['sort-order'] = 'newest'
207+
store.preferences['layout-message-view'] = 'threaded'
207208

208209
store.addAccountMutation(account13)
209210
store.addMailboxMutation({
@@ -245,7 +246,7 @@ describe('Vuex store actions', () => {
245246

246247
expect(MessageService.fetchEnvelopes).toHaveBeenCalledTimes(1)
247248
expect(MessageService.fetchEnvelopes)
248-
.toHaveBeenNthCalledWith(1, 13, 11, undefined, 300000, PAGE_SIZE, 'newest')
249+
.toHaveBeenNthCalledWith(1, 13, 11, undefined, 300000, PAGE_SIZE, 'newest', 'threaded')
249250
expect(store.mailboxes[UNIFIED_INBOX_ID].envelopeLists[''].toSorted()).toEqual([
250251
// Initial envelopes
251252
...msgs1.map(mockEnvelope(11)),
@@ -271,6 +272,7 @@ describe('Vuex store actions', () => {
271272
}
272273

273274
store.preferences['sort-order'] = 'newest'
275+
//store.preferences['layout-message-view'] = 'threaded'
274276

275277
store.addAccountMutation(account13)
276278
store.addMailboxMutation({
@@ -335,6 +337,7 @@ describe('Vuex store actions', () => {
335337
}
336338

337339
store.preferences['sort-order'] = 'newest'
340+
store.preferences['layout-message-view'] = 'threaded'
338341

339342
store.addAccountMutation(account13)
340343
store.addAccountMutation(account26)
@@ -403,9 +406,9 @@ describe('Vuex store actions', () => {
403406

404407
expect(MessageService.fetchEnvelopes).toHaveBeenCalledTimes(2)
405408
expect(MessageService.fetchEnvelopes)
406-
.toHaveBeenNthCalledWith(1, 13, 11, undefined, 300000, PAGE_SIZE, 'newest')
409+
.toHaveBeenNthCalledWith(1, 13, 11, undefined, 300000, PAGE_SIZE, 'newest', 'threaded')
407410
expect(MessageService.fetchEnvelopes)
408-
.toHaveBeenNthCalledWith(2, 26, 21, undefined, 600000, PAGE_SIZE, 'newest')
411+
.toHaveBeenNthCalledWith(2, 26, 21, undefined, 600000, PAGE_SIZE, 'newest', 'threaded')
409412
expect(store.mailboxes[UNIFIED_INBOX_ID].envelopeLists[''].toSorted()).toEqual([
410413
// Initial envelopes
411414
...page1.map(mockEnvelope(11)),

0 commit comments

Comments
 (0)