Skip to content

Commit 0fd9893

Browse files
committed
fix: re-enter convo to avoid stale element error on CI
1 parent dd7821d commit 0fd9893

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

run/test/specs/message_long_text.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { longText } from '../../constants';
22
import { bothPlatformsItSeparate } from '../../types/sessionIt';
33
import { open_Alice1_Bob1_friends } from './state_builder';
44
import { SupportedPlatformsType, closeApp } from './utils/open_app';
5+
import { sleepFor } from './utils';
6+
import { ConversationItem } from './locators/home';
57

68
bothPlatformsItSeparate({
79
title: 'Send long message 1:1',
@@ -20,7 +22,7 @@ async function sendLongMessageIos(platform: SupportedPlatformsType) {
2022
// Open device and server
2123
const {
2224
devices: { alice1, bob1 },
23-
prebuilt: { alice },
25+
prebuilt: { alice, bob },
2426
} = await open_Alice1_Bob1_friends({
2527
platform,
2628
focusFriendsConvo: true,
@@ -29,7 +31,10 @@ async function sendLongMessageIos(platform: SupportedPlatformsType) {
2931
await alice1.sendMessage(longText);
3032
// Reply to message (User B to User A)
3133
const sentMessage = await bob1.replyToMessage(alice, longText);
32-
// Check reply came through on alice1
34+
// The CI kept throwing a stale element error here so we leave the convo and come back
35+
await alice1.navigateBack();
36+
await alice1.clickOnElementAll(new ConversationItem(alice1, bob.userName));
37+
await sleepFor(1000);
3338
await alice1.findMessageWithBody(sentMessage);
3439
// Close app
3540
await closeApp(alice1, bob1);

0 commit comments

Comments
 (0)