Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates test for Android 1.20.6 #15

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run/test/specs/group_message_delete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function deleteMessageGroup(platform: SupportedPlatformsType) {
.onAndroid()
.checkModalStrings(
englishStripped('deleteMessage').withArgs({ count: 1 }).toString(),
englishStripped('deleteMessageConfirm').toString()
englishStripped('deleteMessageConfirm').withArgs({ count: 1 }).toString()
);
// Select 'Delete for me'
await device1.clickOnElementAll(new DeleteMessageLocally(device1));
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/group_message_unsend.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function unsendMessageGroup(platform: SupportedPlatformsType) {

await device1.checkModalStrings(
englishStripped('deleteMessage').withArgs({ count: 1 }).toString(),
englishStripped('deleteMessageConfirm').toString()
englishStripped('deleteMessageConfirm').withArgs({ count: 1 }).toString()
);

// Select 'Delete for me'
Expand Down
3 changes: 2 additions & 1 deletion run/test/specs/group_tests_add_contact.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ async function addContactToGroup(platform: SupportedPlatformsType) {
await device1.clickOnElementAll(new EditGroup(device1));
await sleepFor(1000);
// Add contact to group
await device1.clickOnElementAll(new InviteContactsMenuItem(device1));
await device1.onIOS().clickOnElementAll(new InviteContactsMenuItem(device1));
await device1.onAndroid().clickOnElementAll(new InviteContactsButton(device1));
// Select new user
const addedContact = await device1.clickOnElementAll({
strategy: 'accessibility id',
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/linked_device_delete_message.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { newContact } from './utils/create_contact';
import { linkedDevice } from './utils/link_device';
import { SupportedPlatformsType, closeApp, openAppThreeDevices } from './utils/open_app';

bothPlatformsIt('Deleted message linked device', 'high', deletedMessageLinkedDevice);
bothPlatformsIt('Delete message linked device', 'high', deletedMessageLinkedDevice);

async function deletedMessageLinkedDevice(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
Expand All @@ -34,7 +34,7 @@ async function deletedMessageLinkedDevice(platform: SupportedPlatformsType) {
.onAndroid()
.checkModalStrings(
englishStripped('deleteMessage').withArgs({ count: 1 }).toString(),
englishStripped('deleteMessageConfirm').toString()
englishStripped('deleteMessageConfirm').withArgs({ count: 1 }).toString()
);

// Select delete for everyone
Expand Down
5 changes: 2 additions & 3 deletions run/test/specs/locators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,8 @@ export class InviteContactsButton extends LocatorsInterface {
switch (this.platform) {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger:id/title',
text: 'Invite Contacts',
strategy: 'accessibility id',
selector: 'Invite Contacts',
};
case 'ios':
return {
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/message_deletion.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function deleteMessage(platform: SupportedPlatformsType) {
.onAndroid()
.checkModalStrings(
englishStripped('deleteMessage').withArgs({ count: 1 }).toString(),
englishStripped('deleteMessageConfirm').toString()
englishStripped('deleteMessageConfirm').withArgs({ count: 1 }).toString()
);

// Select 'Delete on this device only'
Expand Down
3 changes: 2 additions & 1 deletion run/test/specs/message_link_preview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ async function sendLinkAndroid(platform: SupportedPlatformsType) {
strategy: 'accessibility id',
selector: 'Enable',
});
// No preview on first send
//wait for preview to generate
await sleepFor(5000);
await device1.clickOnByAccessibilityID('Send message button');
await device1.waitForTextElementToBePresent({
strategy: 'accessibility id',
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/message_unsend.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function unsendMessage(platform: SupportedPlatformsType) {
.onAndroid()
.checkModalStrings(
englishStripped('deleteMessage').withArgs({ count: 1 }).toString(),
englishStripped('deleteMessageConfirm').toString()
englishStripped('deleteMessageConfirm').withArgs({ count: 1 }).toString()
);

// Select 'Delete for me and User B'
Expand Down
3 changes: 2 additions & 1 deletion run/test/specs/user_actions_delete_contact.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ async function deleteContact(platform: SupportedPlatformsType) {
await device1.clickOnElementAll({ strategy: 'accessibility id', selector: 'Delete' });
await device1.checkModalStrings(
englishStripped('conversationsDelete').toString(),
englishStripped('conversationsDeleteDescription').withArgs({ name: USERNAME.BOB }).toString()
englishStripped('conversationsDeleteDescription').withArgs({ name: USERNAME.BOB }).toString(),
true
);
await device1.clickOnElementAll(new DeleteContactModalConfirm(device1));
await Promise.all([
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/user_actions_set_nickname.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { newUser } from './utils/create_account';
import { newContact } from './utils/create_contact';
import { SupportedPlatformsType, closeApp, openAppTwoDevices } from './utils/open_app';

iosIt('Create nickname', 'high', setNicknameIos);
androidIt('Create nickname', 'high', setNicknameAndroid);
iosIt('Set nickname', 'high', setNicknameIos);
androidIt('Set nickname', 'high', setNicknameAndroid);

async function setNicknameIos(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
Expand Down