Decrease threads flakiness
This commit is contained in:
parent
d06c59518c
commit
22b485994a
|
@ -129,13 +129,13 @@ async function mockRandomMessage(message: string, isThread = false) {
|
||||||
try {
|
try {
|
||||||
await matchMessage();
|
await matchMessage();
|
||||||
} catch {
|
} catch {
|
||||||
// TODO: Create a proper test for this elsewhere.
|
|
||||||
await dismissReviewNag();
|
await dismissReviewNag();
|
||||||
await matchMessage();
|
await matchMessage();
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Create a proper test for this elsewhere.
|
||||||
async function dismissReviewNag() {
|
async function dismissReviewNag() {
|
||||||
const deviceType = device.getPlatform();
|
const deviceType = device.getPlatform();
|
||||||
const { textMatcher } = platformTypes[deviceType];
|
const { textMatcher } = platformTypes[deviceType];
|
||||||
|
|
|
@ -156,7 +156,12 @@ describe('Threads', () => {
|
||||||
it('should navigate to thread from thread name', async () => {
|
it('should navigate to thread from thread name', async () => {
|
||||||
const messageText = 'navthreadname';
|
const messageText = 'navthreadname';
|
||||||
await mockRandomMessage('dummymessagebetweenthethread');
|
await mockRandomMessage('dummymessagebetweenthethread');
|
||||||
|
try {
|
||||||
await element(by.id(`message-thread-button-${thread}`)).tap();
|
await element(by.id(`message-thread-button-${thread}`)).tap();
|
||||||
|
} catch {
|
||||||
|
await dismissReviewNag();
|
||||||
|
await element(by.id(`message-thread-button-${thread}`)).tap();
|
||||||
|
}
|
||||||
await waitFor(element(by.id('messagebox-input-thread')))
|
await waitFor(element(by.id('messagebox-input-thread')))
|
||||||
.toExist()
|
.toExist()
|
||||||
.withTimeout(5000);
|
.withTimeout(5000);
|
||||||
|
|
Loading…
Reference in New Issue