Skip to content

Commit 12d795f

Browse files
committed
fix: more Android 1.32.0 fixes
1 parent 7fe749f commit 12d795f

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

run/test/specs/disappear_after_send_off_1o1.spec.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
DisableDisappearingMessages,
99
DisappearingMessagesMenuOption,
1010
DisappearingMessagesSubtitle,
11-
FollowSettingsButton,
1211
SetDisappearMessagesButton,
1312
} from '../locators/disappearing_messages';
1413
import { ConversationItem } from '../locators/home';
@@ -77,13 +76,6 @@ async function disappearAfterSendOff1o1(platform: SupportedPlatformsType, testIn
7776
bob1.waitForControlMessageToBePresent(disappearingMessagesTurnedOff),
7877
alice2.waitForControlMessageToBePresent(disappearingMessagesTurnedOffYou),
7978
]);
80-
// Follow setting on device 2
81-
await bob1.clickOnElementAll(new FollowSettingsButton(bob1));
82-
await bob1.checkModalStrings(
83-
tStripped('disappearingMessagesFollowSetting'),
84-
tStripped('disappearingMessagesFollowSettingOff')
85-
);
86-
await bob1.clickOnElementAll({ strategy: 'accessibility id', selector: 'Confirm' });
8779
// Check conversation subtitle?
8880
await Promise.all(
8981
[alice1, bob1, alice2].map(device =>

run/test/specs/disappearing_messages_follow_settings.spec.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { TestInfo } from '@playwright/test';
33
import { tStripped } from '../../localizer/lib';
44
import { bothPlatformsIt } from '../../types/sessionIt';
55
import { DISAPPEARING_TIMES } from '../../types/testing';
6+
import { MessageBody } from '../locators/conversation';
67
import {
78
DisappearingMessagesSubtitle,
89
FollowSettingsButton,
@@ -34,10 +35,11 @@ async function disappearingMessagesFollowSetting1o1(
3435
) {
3536
const {
3637
devices: { alice1, bob1 },
38+
prebuilt: { alice, bob },
3739
} = await open_Alice1_Bob1_friends({ platform, focusFriendsConvo: true, testInfo });
38-
40+
const aliceMsg = `${alice.userName}'s messages will disappear`;
41+
const bobMsg = `${bob.userName}'s messages will disappear`;
3942
await setDisappearingMessage(alice1, ['1:1', timerType, time]);
40-
4143
// Bob should see the follow settings banner after Alice sets DM
4244
await bob1.clickOnElementAll(new FollowSettingsButton(bob1));
4345
await bob1.checkModalStrings(
@@ -55,6 +57,19 @@ async function disappearingMessagesFollowSetting1o1(
5557
device.waitForTextElementToBePresent(new DisappearingMessagesSubtitle(device))
5658
)
5759
);
58-
60+
const aliceTimestamp = await alice1.sendMessage(aliceMsg);
61+
const bobTimestamp = await bob1.sendMessage(bobMsg);
62+
await Promise.all(
63+
[alice1, bob1].flatMap(device => [
64+
device.hasElementDisappeared({
65+
...new MessageBody(device, aliceMsg).build(),
66+
actualStartTime: aliceTimestamp,
67+
}),
68+
device.hasElementDisappeared({
69+
...new MessageBody(device, bobMsg).build(),
70+
actualStartTime: bobTimestamp,
71+
}),
72+
])
73+
);
5974
await closeApp(alice1, bob1);
6075
}

run/test/specs/message_voice.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function sendVoiceMessage(platform: SupportedPlatformsType, testInfo: Test
3131
await sleepFor(500);
3232
// The voice message long tap must be offset so that it doesn't tap the scrubber
3333
// As this starts playback and does not open the long press menu
34-
await bob1.longPressMessage(new VoiceMessage(bob1), { offset: { x: 0, y: 50 } });
34+
await bob1.longPressMessage(new VoiceMessage(bob1), { offset: { x: 0, y: 100 } });
3535
await bob1.clickOnByAccessibilityID('Reply to message');
3636
await sleepFor(500); // Let the UI settle before finding message input and typing
3737
await bob1.sendMessage(replyMessage);

run/test/utils/community.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import test from '@playwright/test';
22

33
import { DeviceWrapper } from '../../types/DeviceWrapper';
44
import { CommunityInput, JoinCommunityButton } from '../locators';
5-
import { ConversationHeaderName, EmptyConversation } from '../locators/conversation';
5+
import { ConversationHeaderName, MessageBody } from '../locators/conversation';
66
import { PlusButton } from '../locators/home';
77
import { JoinCommunityOption } from '../locators/start_conversation';
88

@@ -16,7 +16,7 @@ export const joinCommunity = async (
1616
await device.inputText(communityLink, new CommunityInput(device));
1717
await device.clickOnElementAll(new JoinCommunityButton(device));
1818
await device.waitForTextElementToBePresent(new ConversationHeaderName(device, communityName));
19-
await device.hasElementBeenDeleted(new EmptyConversation(device)); // checking that messages loaded already
19+
await device.waitForTextElementToBePresent(new MessageBody(device)); // Check for ANY message
2020
await device.scrollToBottom();
2121
};
2222

0 commit comments

Comments
 (0)