mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Fix flaky search behaviour with minimized left pane
This commit is contained in:
@@ -22,6 +22,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: false, results: [] },
|
||||
contactResults: { isLoading: false, results: [] },
|
||||
messageResults: { isLoading: false, results: [] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -46,6 +47,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -62,6 +64,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -75,6 +78,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: false, results: [fakeMessage()] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -90,6 +94,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: false, results: [] },
|
||||
contactResults: { isLoading: false, results: [] },
|
||||
messageResults: { isLoading: false, results: [] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -108,6 +113,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: [] },
|
||||
messageResults: { isLoading: false, results: [fakeMessage()] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -126,6 +132,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -139,6 +146,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -149,6 +157,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: false, results: [fakeMessage()] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -185,6 +194,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: contacts },
|
||||
messageResults: { isLoading: false, results: messages },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -231,6 +241,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: contacts },
|
||||
messageResults: { isLoading: false, results: messages },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -268,6 +279,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: [] },
|
||||
messageResults: { isLoading: false, results: messages },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -310,6 +322,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: contacts },
|
||||
messageResults: { isLoading: false, results: [] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -344,6 +357,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -357,6 +371,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -367,6 +382,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: false, results: [fakeMessage()] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -391,6 +407,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -413,6 +430,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -431,6 +449,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'bar',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -445,6 +464,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -460,6 +480,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'bar',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -474,6 +495,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
conversationResults: { isLoading: true },
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: false, results: [fakeMessage()] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -489,6 +511,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: [] },
|
||||
messageResults: { isLoading: false, results: [fakeMessage()] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -506,6 +529,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: false, results: [] },
|
||||
messageResults: { isLoading: false, results: [] },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -521,6 +545,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
},
|
||||
contactResults: { isLoading: true },
|
||||
messageResults: { isLoading: true },
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'bar',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -544,6 +569,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -571,6 +597,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -595,6 +622,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), expected],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -616,6 +644,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), expected, fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
@@ -639,6 +668,7 @@ describe('LeftPaneSearchHelper', () => {
|
||||
isLoading: false,
|
||||
results: [fakeMessage(), fakeMessage(), fakeMessage()],
|
||||
},
|
||||
isSearchingGlobally: true,
|
||||
searchTerm: 'foo',
|
||||
primarySendsSms: false,
|
||||
searchConversation: undefined,
|
||||
|
||||
Reference in New Issue
Block a user