Skip to content
Draft
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/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { XPath } from '../types/testing';

export const ANDROID_XPATHS: { [key: string]: XPath } = {
PRIVACY_TOGGLE: `/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout[5]/android.widget.RelativeLayout/android.widget.TextView[2]`,
FIRST_GIF: `(//android.widget.ImageView[@resource-id="network.loki.messenger.qa:id/thumbnail"])[1]`,
FIRST_GIF: `(//android.widget.ImageView[@resource-id="network.loki.messenger:id/thumbnail"])[1]`,
VOICE_TOGGLE: `/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.ScrollView/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.widget.Button[1]`,
BROWSE_BUTTON: `/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ScrollView/android.widget.TabHost/android.widget.LinearLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.RelativeLayout/android.widget.GridView/android.widget.LinearLayout/android.widget.LinearLayout[2]`,
MODAL_DESCRIPTIONS: `/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.appcompat.widget.LinearLayoutCompat/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView[2]`,
Expand Down
4 changes: 2 additions & 2 deletions run/screenshots/android/settings_privacy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion run/test/specs/app_disguise_set.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async function appDisguiseSetIconAndroid(platform: SupportedPlatformsType, testI
await test.step(TestSteps.SETUP.CLOSE_APP, async () => {
await closeApp(device);
await runScriptAndLog(
`${getAdbFullPath()} -s ${device.udid} uninstall network.loki.messenger.qa`,
`${getAdbFullPath()} -s ${device.udid} uninstall network.loki.messenger`,
true
);
});
Expand Down
3 changes: 3 additions & 0 deletions run/test/specs/community_requests_off.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { testCommunityLink, testCommunityName } from '../../constants/community'
import { TestSteps } from '../../types/allure';
import { bothPlatformsIt } from '../../types/sessionIt';
import { CommunityMessageAuthor, UPMMessageButton } from './locators/conversation';
import { sleepFor } from './utils';
import { newUser } from './utils/create_account';
import { joinCommunity } from './utils/join_community';
import { closeApp, openAppTwoDevices, SupportedPlatformsType } from './utils/open_app';
Expand Down Expand Up @@ -41,6 +42,8 @@ async function blindedMessageRequests(platform: SupportedPlatformsType, testInfo
});
await device1.clickOnElementAll(new CommunityMessageAuthor(device1, message));
await test.step(`Verify the 'Message' button in the User Profile Modal is disabled`, async () => {
// brief sleep to let the UI settle
await sleepFor(1000);
const messageButton = await device1.waitForTextElementToBePresent(
new UPMMessageButton(device1)
);
Expand Down
3 changes: 3 additions & 0 deletions run/test/specs/community_requests_on.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from './locators/conversation';
import { MessageRequestsBanner } from './locators/home';
import { CommunityMessageRequestSwitch, PrivacyMenuItem, UserSettings } from './locators/settings';
import { sleepFor } from './utils';
import { newUser } from './utils/create_account';
import { joinCommunity } from './utils/join_community';
import { closeApp, openAppTwoDevices, SupportedPlatformsType } from './utils/open_app';
Expand Down Expand Up @@ -60,6 +61,8 @@ async function blindedMessageRequests(platform: SupportedPlatformsType, testInfo
});

await test.step(TestSteps.SEND.MESSAGE(bob.userName, testCommunityName), async () => {
// brief sleep to let the UI settle
await sleepFor(1000);
await device2.sendMessage(message);
await device2.navigateBack();
});
Expand Down
10 changes: 5 additions & 5 deletions run/test/specs/disappearing_call.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,30 @@ async function disappearingCallMessage1o1Android(
// Confirm call is put through
await alice1.waitForTextElementToBePresent({
strategy: 'id',
selector: 'network.loki.messenger.qa:id/callTitle',
selector: 'network.loki.messenger:id/callTitle',
text: 'Ringing...',
maxWait: 5_000,
});
await alice1.waitForTextElementToBePresent({
strategy: 'id',
selector: 'network.loki.messenger.qa:id/callSubtitle',
selector: 'network.loki.messenger:id/callSubtitle',
text: 'Sending Call Offer 2/5',
maxWait: 5_000,
});
await alice1.clickOnElementById('network.loki.messenger.qa:id/endCallButton');
await alice1.clickOnElementById('network.loki.messenger:id/endCallButton');
const callEndTimestamp = Date.now();
// Wait for control message to disappear
await Promise.all([
alice1.hasElementDisappeared({
strategy: 'id',
selector: 'network.loki.messenger.qa:id/call_text_view',
selector: 'network.loki.messenger:id/call_text_view',
text: `You called ${bob.userName}`,
maxWait,
actualStartTime: callEndTimestamp,
}),
bob1.hasElementDisappeared({
strategy: 'id',
selector: 'network.loki.messenger.qa:id/call_text_view',
selector: 'network.loki.messenger:id/call_text_view',
text: `Missed call from ${alice.userName}`,
maxWait,
actualStartTime: callEndTimestamp,
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/group_message_video.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function sendVideoGroupAndroid(platform: SupportedPlatformsType, testInfo:
bob1.waitForLoadingMedia(),
bob1.waitForTextElementToBePresent({
strategy: 'id',
selector: 'network.loki.messenger.qa:id/play_overlay',
selector: 'network.loki.messenger:id/play_overlay',
maxWait: 8000,
}),
]);
Expand All @@ -92,7 +92,7 @@ async function sendVideoGroupAndroid(platform: SupportedPlatformsType, testInfo:
charlie1.waitForLoadingMedia(),
charlie1.waitForTextElementToBePresent({
strategy: 'id',
selector: 'network.loki.messenger.qa:id/play_overlay',
selector: 'network.loki.messenger:id/play_overlay',
maxWait: 8000,
}),
]);
Expand Down
6 changes: 6 additions & 0 deletions run/test/specs/group_tests_mentions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ bothPlatformsIt({
risk: 'medium',
testCb: mentionsForGroups,
countOfDevicesNeeded: 3,
allureSuites: {
parent: 'Sending Messages',
suite: 'Mentions',
},
allureDescription:
'Verifies that mentions can be sent to a group, and that all participants see them correctly.',
});

async function mentionsForGroups(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ bothPlatformsIt({
risk: 'low',
testCb: onboardingIncorrectSeed,
countOfDevicesNeeded: 1,
allureSuites: {
parent: 'Onboarding',
suite: 'Input validations',
},
allureDescription: `Verifies that a seed phrase with a word not on the mnemonic list throws the 'some words are incorrect' error as expected.`,
});

async function onboardingIncorrectSeed(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
5 changes: 5 additions & 0 deletions run/test/specs/input_validations/onboarding_long_name.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ bothPlatformsIt({
risk: 'low',
testCb: onboardingLongName,
countOfDevicesNeeded: 1,
allureSuites: {
parent: 'Onboarding',
suite: 'Input validations',
},
allureDescription: `Verifies that a too long display name (101 bytes) throws the 'shorter display name' error as expected.`,
});

async function onboardingLongName(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
5 changes: 5 additions & 0 deletions run/test/specs/input_validations/onboarding_no_name.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ bothPlatformsIt({
risk: 'low',
testCb: onboardingNoName,
countOfDevicesNeeded: 1,
allureSuites: {
parent: 'Onboarding',
suite: 'Input validations',
},
allureDescription: `Verifies that an empty display name throws the 'please enter a display name' error as expected.`,
});

async function onboardingNoName(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
5 changes: 5 additions & 0 deletions run/test/specs/input_validations/onboarding_no_seed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ bothPlatformsIt({
risk: 'low',
testCb: onboardingNoSeed,
countOfDevicesNeeded: 1,
allureSuites: {
parent: 'Onboarding',
suite: 'Input validations',
},
allureDescription: `Verifies that an empty seed phrase throws the 'not long enough' error as expected.`,
});

async function onboardingNoSeed(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ bothPlatformsIt({
risk: 'low',
testCb: onboardingIncorrectSeed,
countOfDevicesNeeded: 1,
allureSuites: {
parent: 'Onboarding',
suite: 'Input validations',
},
allureDescription: `Verifies that a too long seed phrase throws the 'check your recovery password' error as expected.`,
});

async function onboardingIncorrectSeed(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
6 changes: 6 additions & 0 deletions run/test/specs/linked_device.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ bothPlatformsIt({
risk: 'high',
testCb: linkDevice,
countOfDevicesNeeded: 2,
allureSuites: {
parent: 'Onboarding',
suite: 'Restore account',
},
allureDescription:
'Verifies that restoring an account works as expected: Display Name and Account ID match, no Recovery password banner on home screen.',
});

async function linkDevice(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand Down
14 changes: 11 additions & 3 deletions run/test/specs/linked_group_leave.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { bothPlatformsIt } from '../../types/sessionIt';
import { USERNAME } from '../../types/testing';
import { ConversationSettings } from './locators/conversation';
import { LeaveGroupConfirm, LeaveGroupMenuItem } from './locators/groups';
import { ConversationItem } from './locators/home';
import { sleepFor } from './utils';
import { newUser } from './utils/create_account';
import { createGroup } from './utils/create_group';
Expand All @@ -16,6 +17,11 @@ bothPlatformsIt({
risk: 'high',
testCb: leaveGroupLinkedDevice,
countOfDevicesNeeded: 4,
allureSuites: {
parent: 'Groups',
suite: 'Leave/Delete Group',
},
allureDescription: 'Verifies that leaving a group syncs to a linked device',
});

async function leaveGroupLinkedDevice(platform: SupportedPlatformsType, testInfo: TestInfo) {
Expand All @@ -39,9 +45,11 @@ async function leaveGroupLinkedDevice(platform: SupportedPlatformsType, testInfo
);
// Modal with Leave/Cancel
await device3.clickOnElementAll(new LeaveGroupConfirm(device3));
// Check for control message
await sleepFor(5000);
await device4.onIOS().hasTextElementBeenDeleted('Conversation list item', testGroupName);
// Check for group disappearing
await Promise.all([
device3.verifyElementNotPresent(new ConversationItem(device3, testGroupName)),
device4.hasElementBeenDeleted(new ConversationItem(device4, testGroupName)),
]);
// Create control message for user leaving group
const groupMemberLeft = englishStrippedStr('groupMemberLeft')
.withArgs({ name: charlie.userName })
Expand Down
22 changes: 11 additions & 11 deletions run/test/specs/locators/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class ScrollToBottomButton extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/scrollToBottomButton',
selector: 'network.loki.messenger:id/scrollToBottomButton',
} as const;
case 'ios':
return {
Expand Down Expand Up @@ -182,7 +182,7 @@ export class OutgoingMessageStatusSent extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/messageStatusTextView',
selector: 'network.loki.messenger:id/messageStatusTextView',
text: 'Sent',
} as const;
case 'ios':
Expand Down Expand Up @@ -419,7 +419,7 @@ export class CommunityInviteConfirmButton extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'invite-contacts-button',
selector: 'qa-collapsing-footer-action_invite',
} as const;
case 'ios':
return {
Expand All @@ -436,7 +436,7 @@ export class CommunityInvitation extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/openGroupTitleTextView',
selector: 'network.loki.messenger:id/openGroupTitleTextView',
text: testCommunityName,
} as const;
case 'ios':
Expand Down Expand Up @@ -530,7 +530,7 @@ export class FirstEmojiReact extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/reaction_1',
selector: 'network.loki.messenger:id/reaction_1',
} as const;
case 'ios':
return {
Expand All @@ -555,7 +555,7 @@ export class EmojiReactsPill extends LocatorsInterface {
case 'android':
return {
strategy: 'xpath',
selector: `//android.view.ViewGroup[@resource-id="network.loki.messenger.qa:id/mainContainer"][.//android.widget.TextView[contains(@text,"${this.messageText}")]]//android.view.ViewGroup[@resource-id="network.loki.messenger.qa:id/layout_emoji_container"]`,
selector: `//android.view.ViewGroup[@resource-id="network.loki.messenger:id/mainContainer"][.//android.widget.TextView[contains(@text,"${this.messageText}")]]//android.view.ViewGroup[@resource-id="network.loki.messenger:id/layout_emoji_container"]`,
} as const;
case 'ios':
return {
Expand All @@ -580,7 +580,7 @@ export class EmojiReactsCount extends LocatorsInterface {
case 'android':
return {
strategy: 'xpath',
selector: `//android.view.ViewGroup[@resource-id="network.loki.messenger.qa:id/mainContainer"][.//android.widget.TextView[contains(@text,"${this.messageText}")]]//android.widget.TextView[@resource-id="network.loki.messenger.qa:id/reactions_pill_count"][@text="${this.expectedCount}"]`,
selector: `//android.view.ViewGroup[@resource-id="network.loki.messenger:id/mainContainer"][.//android.widget.TextView[contains(@text,"${this.messageText}")]]//android.widget.TextView[@resource-id="network.loki.messenger:id/reactions_pill_count"][@text="${this.expectedCount}"]`,
} as const;
case 'ios':
return {
Expand All @@ -603,7 +603,7 @@ export class MessageLengthCountdown extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/characterLimitText',
selector: 'network.loki.messenger:id/characterLimitText',
text: this.length,
} as const;
case 'ios':
Expand Down Expand Up @@ -639,7 +639,7 @@ export class CommunityMessageAuthor extends LocatorsInterface {
// Identify the profile picture of a message with a specific text
return {
strategy: 'xpath',
selector: `//android.view.ViewGroup[@resource-id='network.loki.messenger.qa:id/mainContainer'][.//android.widget.TextView[contains(@text,'${this.text}')]]//androidx.compose.ui.platform.ComposeView[@resource-id='network.loki.messenger.qa:id/profilePictureView']`,
selector: `//android.view.ViewGroup[@resource-id='network.loki.messenger:id/mainContainer'][.//android.widget.TextView[contains(@text,'${this.text}')]]//androidx.compose.ui.platform.ComposeView[@resource-id='network.loki.messenger:id/profilePictureView']`,
} as const;
case 'ios':
// Identify the display name of a blinded sender of a message with a specific text
Expand Down Expand Up @@ -677,7 +677,7 @@ export class MessageRequestPendingDescription extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/textSendAfterApproval',
selector: 'network.loki.messenger:id/textSendAfterApproval',
text: messageRequestPendingDescription,
} as const;
case 'ios':
Expand All @@ -699,7 +699,7 @@ export class MessageRequestAcceptDescription extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/sendAcceptsTextView',
selector: 'network.loki.messenger:id/sendAcceptsTextView',
text: messageRequestsAcceptDescription,
} as const;
case 'ios':
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/locators/global_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class CancelSearchButton extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/search_cancel',
selector: 'network.loki.messenger:id/search_cancel',
text: 'Cancel',
};
case 'ios':
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/locators/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class InviteContactConfirm extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'invite-contacts-button',
selector: 'qa-collapsing-footer-action_invite',
} as const;
case 'ios':
return {
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/locators/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class EmptyLandingPage extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/emptyStateContainer',
selector: 'network.loki.messenger:id/emptyStateContainer',
} as const;
case 'ios':
return {
Expand Down Expand Up @@ -93,7 +93,7 @@ export class MessageSnippet extends LocatorsInterface {
case 'android':
return {
strategy: 'xpath',
selector: `//android.widget.LinearLayout[.//android.widget.TextView[@content-desc="Conversation list item" and @text="${this.conversationName}"]]//android.widget.TextView[@resource-id="network.loki.messenger.qa:id/snippetTextView" and @text="${this.messageText}"]`,
selector: `//android.widget.LinearLayout[.//android.widget.TextView[@content-desc="Conversation list item" and @text="${this.conversationName}"]]//android.widget.TextView[@resource-id="network.loki.messenger:id/snippetTextView" and @text="${this.messageText}"]`,
} as const;
}
}
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/locators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ApplyChanges extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/action_apply',
selector: 'network.loki.messenger:id/action_apply',
} as const;
case 'ios':
return {
Expand Down Expand Up @@ -486,7 +486,7 @@ export class LinkPreviewMessage extends LocatorsInterface {
case 'android':
return {
strategy: 'id',
selector: 'network.loki.messenger.qa:id/linkPreviewView',
selector: 'network.loki.messenger:id/linkPreviewView',
};
case 'ios':
throw new Error(`No such element on iOS`);
Expand Down
Loading
Loading