diff --git a/run/constants/index.ts b/run/constants/index.ts index dda7b7ea0..f8735c1fd 100644 --- a/run/constants/index.ts +++ b/run/constants/index.ts @@ -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]`, diff --git a/run/screenshots/android/settings_privacy.png b/run/screenshots/android/settings_privacy.png index 7afe312b0..90b58f6b9 100644 --- a/run/screenshots/android/settings_privacy.png +++ b/run/screenshots/android/settings_privacy.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2db83338c651b6e56b70f23b7faeae92dc98bb652e24b52c0ac961ec6d7b3e47 -size 200618 +oid sha256:e37c1174f4651cf2adb148517fe86ae36a6006bc50b71c9f2a1a329ac38f2940 +size 197778 diff --git a/run/test/specs/app_disguise_set.spec.ts b/run/test/specs/app_disguise_set.spec.ts index 15c7d3a84..6c91b5c89 100644 --- a/run/test/specs/app_disguise_set.spec.ts +++ b/run/test/specs/app_disguise_set.spec.ts @@ -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 ); }); diff --git a/run/test/specs/community_requests_off.spec.ts b/run/test/specs/community_requests_off.spec.ts index 89057bdf3..5575b0ea8 100644 --- a/run/test/specs/community_requests_off.spec.ts +++ b/run/test/specs/community_requests_off.spec.ts @@ -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'; @@ -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) ); diff --git a/run/test/specs/community_requests_on.spec.ts b/run/test/specs/community_requests_on.spec.ts index de0c98ece..1a7a53b89 100644 --- a/run/test/specs/community_requests_on.spec.ts +++ b/run/test/specs/community_requests_on.spec.ts @@ -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'; @@ -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(); }); diff --git a/run/test/specs/disappearing_call.spec.ts b/run/test/specs/disappearing_call.spec.ts index 93a901080..859d47d81 100644 --- a/run/test/specs/disappearing_call.spec.ts +++ b/run/test/specs/disappearing_call.spec.ts @@ -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, diff --git a/run/test/specs/group_message_video.spec.ts b/run/test/specs/group_message_video.spec.ts index e97d37dbf..b83113a52 100644 --- a/run/test/specs/group_message_video.spec.ts +++ b/run/test/specs/group_message_video.spec.ts @@ -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, }), ]); @@ -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, }), ]); diff --git a/run/test/specs/group_tests_mentions.spec.ts b/run/test/specs/group_tests_mentions.spec.ts index e045f88a3..83de7e33d 100644 --- a/run/test/specs/group_tests_mentions.spec.ts +++ b/run/test/specs/group_tests_mentions.spec.ts @@ -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) { diff --git a/run/test/specs/input_validations/onboarding_incorrect_seed.spec.ts b/run/test/specs/input_validations/onboarding_incorrect_seed.spec.ts index d855b7bdb..ae8140d4e 100644 --- a/run/test/specs/input_validations/onboarding_incorrect_seed.spec.ts +++ b/run/test/specs/input_validations/onboarding_incorrect_seed.spec.ts @@ -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) { diff --git a/run/test/specs/input_validations/onboarding_long_name.spec.ts b/run/test/specs/input_validations/onboarding_long_name.spec.ts index 0242f93cb..afbc62d16 100644 --- a/run/test/specs/input_validations/onboarding_long_name.spec.ts +++ b/run/test/specs/input_validations/onboarding_long_name.spec.ts @@ -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) { diff --git a/run/test/specs/input_validations/onboarding_no_name.spec.ts b/run/test/specs/input_validations/onboarding_no_name.spec.ts index e7acd93d0..0e6010670 100644 --- a/run/test/specs/input_validations/onboarding_no_name.spec.ts +++ b/run/test/specs/input_validations/onboarding_no_name.spec.ts @@ -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) { diff --git a/run/test/specs/input_validations/onboarding_no_seed.spec.ts b/run/test/specs/input_validations/onboarding_no_seed.spec.ts index f4a59cd0d..0fc3ae064 100644 --- a/run/test/specs/input_validations/onboarding_no_seed.spec.ts +++ b/run/test/specs/input_validations/onboarding_no_seed.spec.ts @@ -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) { diff --git a/run/test/specs/input_validations/onboarding_wrong_seed.spec.ts b/run/test/specs/input_validations/onboarding_wrong_seed.spec.ts index 36b1ed78a..8d4ee3bc6 100644 --- a/run/test/specs/input_validations/onboarding_wrong_seed.spec.ts +++ b/run/test/specs/input_validations/onboarding_wrong_seed.spec.ts @@ -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) { diff --git a/run/test/specs/linked_device.spec.ts b/run/test/specs/linked_device.spec.ts index ac0cfbefc..03983bc4e 100644 --- a/run/test/specs/linked_device.spec.ts +++ b/run/test/specs/linked_device.spec.ts @@ -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) { diff --git a/run/test/specs/linked_group_leave.spec.ts b/run/test/specs/linked_group_leave.spec.ts index 19a385504..4a0b16229 100644 --- a/run/test/specs/linked_group_leave.spec.ts +++ b/run/test/specs/linked_group_leave.spec.ts @@ -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'; @@ -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) { @@ -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 }) diff --git a/run/test/specs/locators/conversation.ts b/run/test/specs/locators/conversation.ts index 66cfce859..e6b04f260 100644 --- a/run/test/specs/locators/conversation.ts +++ b/run/test/specs/locators/conversation.ts @@ -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 { @@ -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': @@ -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 { @@ -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': @@ -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 { @@ -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 { @@ -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 { @@ -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': @@ -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 @@ -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': @@ -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': diff --git a/run/test/specs/locators/global_search.ts b/run/test/specs/locators/global_search.ts index 3230131fc..d65f852e8 100644 --- a/run/test/specs/locators/global_search.ts +++ b/run/test/specs/locators/global_search.ts @@ -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': diff --git a/run/test/specs/locators/groups.ts b/run/test/specs/locators/groups.ts index 89f1439f9..19b2a9e6a 100644 --- a/run/test/specs/locators/groups.ts +++ b/run/test/specs/locators/groups.ts @@ -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 { diff --git a/run/test/specs/locators/home.ts b/run/test/specs/locators/home.ts index df2c090c3..675968732 100644 --- a/run/test/specs/locators/home.ts +++ b/run/test/specs/locators/home.ts @@ -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 { @@ -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; } } diff --git a/run/test/specs/locators/index.ts b/run/test/specs/locators/index.ts index 955f7c001..960e974ba 100644 --- a/run/test/specs/locators/index.ts +++ b/run/test/specs/locators/index.ts @@ -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 { @@ -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`); diff --git a/run/test/specs/locators/onboarding.ts b/run/test/specs/locators/onboarding.ts index 869e16c8b..8d63561f0 100644 --- a/run/test/specs/locators/onboarding.ts +++ b/run/test/specs/locators/onboarding.ts @@ -28,7 +28,7 @@ export class BackButton extends LocatorsInterface { case 'android': return { strategy: 'id', - selector: 'network.loki.messenger.qa:id/back_button', + selector: 'network.loki.messenger:id/back_button', } as const; case 'ios': return { @@ -105,7 +105,7 @@ export class TermsOfServiceButton extends LocatorsInterface { case 'android': return { strategy: 'id', - selector: 'Terms of Service', // will be Terms of service *button* past 1.29.0 + selector: 'Terms of service button', } as const; case 'ios': return { @@ -122,7 +122,7 @@ export class PrivacyPolicyButton extends LocatorsInterface { case 'android': return { strategy: 'id', - selector: 'Privacy Policy', // will be Privacy policy *button* past 1.29.0 + selector: 'Privacy policy button', } as const; case 'ios': return { diff --git a/run/test/specs/locators/settings.ts b/run/test/specs/locators/settings.ts index 02ae1349b..742940bf0 100644 --- a/run/test/specs/locators/settings.ts +++ b/run/test/specs/locators/settings.ts @@ -235,7 +235,7 @@ export class ClassicLightThemeOption extends LocatorsInterface { case 'android': return { strategy: 'id', - selector: 'network.loki.messenger.qa:id/theme_option_classic_light', + selector: 'network.loki.messenger:id/theme_option_classic_light', } as const; case 'ios': return { diff --git a/run/test/specs/message_check_performance.spec.ts b/run/test/specs/message_check_performance.spec.ts index e9a3bd611..5212a4805 100644 --- a/run/test/specs/message_check_performance.spec.ts +++ b/run/test/specs/message_check_performance.spec.ts @@ -9,6 +9,11 @@ bothPlatformsIt({ risk: 'low', testCb: checkPerformance, countOfDevicesNeeded: 2, + allureSuites: { + parent: 'Sending Messages', + suite: 'Performance', + }, + allureDescription: 'Sends a message 10 times in a 1-1 and logs the sending time', }); async function checkPerformance(platform: SupportedPlatformsType, testInfo: TestInfo) { diff --git a/run/test/specs/message_requests_accept_text_reply.spec.ts b/run/test/specs/message_requests_accept_text_reply.spec.ts index 8337631b8..525912dd6 100644 --- a/run/test/specs/message_requests_accept_text_reply.spec.ts +++ b/run/test/specs/message_requests_accept_text_reply.spec.ts @@ -46,7 +46,7 @@ async function acceptRequestWithText(platform: SupportedPlatformsType, testInfo: }); await device1.onAndroid().waitForTextElementToBePresent({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/textSendAfterApproval', + selector: 'network.loki.messenger:id/textSendAfterApproval', text: messageRequestPendingDescription, }); @@ -69,7 +69,7 @@ async function acceptRequestWithText(platform: SupportedPlatformsType, testInfo: await device2.onAndroid().waitForTextElementToBePresent({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/sendAcceptsTextView', + selector: 'network.loki.messenger:id/sendAcceptsTextView', text: messageRequestsAcceptDescription, }); diff --git a/run/test/specs/message_video.spec.ts b/run/test/specs/message_video.spec.ts index 42b2a0bfb..4229f3ebf 100644 --- a/run/test/specs/message_video.spec.ts +++ b/run/test/specs/message_video.spec.ts @@ -63,7 +63,7 @@ async function sendVideoAndroid(platform: SupportedPlatformsType, testInfo: Test await bob1.trustAttachments(alice.userName); await bob1.waitForTextElementToBePresent({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/play_overlay', + selector: 'network.loki.messenger:id/play_overlay', }); await bob1.longPress(new MediaMessage(bob1)); await bob1.clickOnByAccessibilityID('Reply to message'); diff --git a/run/test/specs/review_once.spec.ts b/run/test/specs/review_once.spec.ts index 42fb61626..e90904165 100644 --- a/run/test/specs/review_once.spec.ts +++ b/run/test/specs/review_once.spec.ts @@ -2,15 +2,16 @@ import { test, type TestInfo } from '@playwright/test'; import { englishStrippedStr } from '../../localizer/englishStrippedStr'; import { TestSteps } from '../../types/allure'; -import { androidIt } from '../../types/sessionIt'; +import { bothPlatformsIt } from '../../types/sessionIt'; import { USERNAME } from '../../types/testing'; +import { CloseSettings } from './locators'; import { ModalHeading } from './locators/global'; import { PlusButton } from './locators/home'; import { PathMenuItem, UserSettings } from './locators/settings'; import { newUser } from './utils/create_account'; import { closeApp, openAppOnPlatformSingleDevice, SupportedPlatformsType } from './utils/open_app'; -androidIt({ +bothPlatformsIt({ title: 'Review prompt only once', risk: 'medium', countOfDevicesNeeded: 1, @@ -39,7 +40,7 @@ async function reviewPromptOnce(platform: SupportedPlatformsType, testInfo: Test englishStrippedStr('enjoyingSession').toString(), englishStrippedStr('enjoyingSessionDescription').toString() ); - await device.clickOnByAccessibilityID('back'); // Yes this is lowercase to close the modal + await device.clickOnElementAll(new CloseSettings(device)); }); await test.step(TestSteps.OPEN.PATH, async () => { await device.clickOnElementAll(new UserSettings(device)); diff --git a/run/test/specs/user_actions_read_status.spec.ts b/run/test/specs/user_actions_read_status.spec.ts index 8ccc3d1cb..bac9194e3 100644 --- a/run/test/specs/user_actions_read_status.spec.ts +++ b/run/test/specs/user_actions_read_status.spec.ts @@ -36,7 +36,7 @@ async function readStatus(platform: SupportedPlatformsType, testInfo: TestInfo) // Check read status on device 1 await alice1.onAndroid().waitForTextElementToBePresent({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/messageStatusTextView', + selector: 'network.loki.messenger:id/messageStatusTextView', text: 'Read', }); diff --git a/run/test/specs/utils/capabilities_android.ts b/run/test/specs/utils/capabilities_android.ts index 3bb752fb8..504383ce7 100644 --- a/run/test/specs/utils/capabilities_android.ts +++ b/run/test/specs/utils/capabilities_android.ts @@ -20,8 +20,8 @@ const sharedCapabilities: AppiumAndroidCapabilities & AppiumCapabilities = { 'appium:app': androidAppFullPath, 'appium:platformName': 'Android', 'appium:platformVersion': '14', - 'appium:appPackage': 'network.loki.messenger.qa', - 'appium:appActivity': 'network.loki.messenger.RoutingActivity', // This one still needs the original package name (without qa suffix) + 'appium:appPackage': 'network.loki.messenger', + 'appium:appActivity': 'network.loki.messenger.RoutingActivity', 'appium:automationName': 'UiAutomator2', 'appium:newCommandTimeout': 300000, 'appium:eventTimings': false, diff --git a/run/test/specs/utils/join_community.ts b/run/test/specs/utils/join_community.ts index a18102732..342d1d4a3 100644 --- a/run/test/specs/utils/join_community.ts +++ b/run/test/specs/utils/join_community.ts @@ -1,6 +1,6 @@ import { DeviceWrapper } from '../../../types/DeviceWrapper'; import { CommunityInput, JoinCommunityButton } from '../locators'; -import { ConversationHeaderName } from '../locators/conversation'; +import { ConversationHeaderName, EmptyConversation } from '../locators/conversation'; import { PlusButton } from '../locators/home'; import { JoinCommunityOption } from '../locators/start_conversation'; @@ -14,4 +14,6 @@ export const joinCommunity = async ( await device.inputText(communityLink, new CommunityInput(device)); await device.clickOnElementAll(new JoinCommunityButton(device)); await device.waitForTextElementToBePresent(new ConversationHeaderName(device, communityName)); + await device.verifyElementNotPresent(new EmptyConversation(device)); // checking that messages loaded already + await device.scrollToBottom(); }; diff --git a/run/test/specs/voice_calls.spec.ts b/run/test/specs/voice_calls.spec.ts index 300c563b5..ba2a48064 100644 --- a/run/test/specs/voice_calls.spec.ts +++ b/run/test/specs/voice_calls.spec.ts @@ -206,29 +206,29 @@ async function voiceCallAndroid(platform: SupportedPlatformsType, testInfo: Test await test.step(TestSteps.VERIFY.CALLING, async () => { 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'); }); // Bob sees the missed call and also jumps through all the hoops await test.step(TestSteps.VERIFY.MISSED_CALL, async () => { await bob1.waitForTextElementToBePresent({ 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}`, }); await bob1.clickOnElementAll({ 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}`, }); }); @@ -250,30 +250,30 @@ async function voiceCallAndroid(platform: SupportedPlatformsType, testInfo: Test await test.step(TestSteps.CALLS.INITIATE_CALL(bob.userName), async () => { await bob1.clickOnElementAll(new CallButton(bob1)); }); - await alice1.clickOnElementById('network.loki.messenger.qa:id/callInProgress'); - await alice1.clickOnElementById('network.loki.messenger.qa:id/acceptCallButton'); + await alice1.clickOnElementById('network.loki.messenger:id/callInProgress'); + await alice1.clickOnElementById('network.loki.messenger:id/acceptCallButton'); await test.step(TestSteps.VERIFY.CALL_SUCCESSFUL, async () => { await Promise.all( [alice1, bob1].map(device => // If the text contains a colon it means its showing the call duration (ergo the call connected) device.waitForTextElementToBePresent({ strategy: 'xpath', - selector: `//*[@resource-id='network.loki.messenger.qa:id/callTitle' and contains(@text, ':')]`, + selector: `//*[@resource-id='network.loki.messenger:id/callTitle' and contains(@text, ':')]`, maxWait: 15_000, }) ) ); - await alice1.clickOnElementById('network.loki.messenger.qa:id/endCallButton'); + await alice1.clickOnElementById('network.loki.messenger:id/endCallButton'); await Promise.all([ alice1.waitForTextElementToBePresent({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/call_text_view', + selector: 'network.loki.messenger:id/call_text_view', text: `${bob.userName} called you`, maxWait: 15_000, }), bob1.waitForTextElementToBePresent({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/call_text_view', + selector: 'network.loki.messenger:id/call_text_view', text: `You called ${alice.userName}`, maxWait: 15_000, }), diff --git a/run/types/DeviceWrapper.ts b/run/types/DeviceWrapper.ts index 6b5dd0583..e2675dab5 100644 --- a/run/types/DeviceWrapper.ts +++ b/run/types/DeviceWrapper.ts @@ -336,7 +336,7 @@ export class DeviceWrapper { { from: 'New conversation button', to: 'conversation-options-avatar' }, ]; - // System locators such as 'network.loki.messenger.qa:id' can cause false positives with too high similarity scores + // System locators such as 'network.loki.messenger:id' can cause false positives with too high similarity scores // Strip any known prefix patterns first const stripPrefix = (selector: string) => { return selector @@ -1559,7 +1559,7 @@ export class DeviceWrapper { async () => { const element = await this.findElementQuietly({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/thumbnail_load_indicator', + selector: 'network.loki.messenger:id/thumbnail_load_indicator', }); // Success when element is GONE @@ -1877,12 +1877,12 @@ export class DeviceWrapper { await sleepFor(500); await this.clickOnElementAll({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/mediapicker_folder_item_thumbnail', + selector: 'network.loki.messenger:id/mediapicker_folder_item_thumbnail', }); await sleepFor(100); await this.clickOnElementAll({ strategy: 'id', - selector: 'network.loki.messenger.qa:id/mediapicker_image_item_thumbnail', + selector: 'network.loki.messenger:id/mediapicker_image_item_thumbnail', }); } await this.inputText(message, new MessageInput(this)); @@ -2156,7 +2156,7 @@ export class DeviceWrapper { }); await sleepFor(500); await this.clickOnElementAll(new ImageName(this)); - await this.clickOnElementById('network.loki.messenger.qa:id/crop_image_menu_crop'); + await this.clickOnElementById('network.loki.messenger:id/crop_image_menu_crop'); } await this.clickOnElementAll(new SaveProfilePictureButton(this)); } diff --git a/run/types/allure.ts b/run/types/allure.ts index c9d5cb235..d1bd19236 100644 --- a/run/types/allure.ts +++ b/run/types/allure.ts @@ -26,7 +26,11 @@ export type AllureSuiteConfig = | { parent: 'Linkouts' } | { parent: 'Network Page' } | { parent: 'New Conversation'; suite: 'Invite a Friend' | 'Join Community' | 'New Message' } - | { parent: 'Sending Messages'; suite: 'Emoji reacts' | 'Message types' | 'Rules' } + | { parent: 'Onboarding'; suite: 'Input validations' | 'Restore account' } + | { + parent: 'Sending Messages'; + suite: 'Emoji reacts' | 'Mentions' | 'Message types' | 'Performance' | 'Rules'; + } | { parent: 'Settings'; suite: 'App Disguise' | 'Community Message Requests' } | { parent: 'User Actions'; diff --git a/run/types/testing.ts b/run/types/testing.ts index b1e78dda5..c55a8a858 100644 --- a/run/types/testing.ts +++ b/run/types/testing.ts @@ -127,15 +127,15 @@ export type StrategyExtractionObj = export type XPath = | '//XCUIElementTypeCell' - | `(//android.widget.ImageView[@resource-id="network.loki.messenger.qa:id/thumbnail"])[1]` + | `(//android.widget.ImageView[@resource-id="network.loki.messenger:id/thumbnail"])[1]` | `(//XCUIElementTypeImage[@name="gif cell"])[1]` | `//*[./*[@name='${DISAPPEARING_TIMES}']]/*[2]` - | `//*[@resource-id='network.loki.messenger.qa:id/callTitle' and contains(@text, ':')]` + | `//*[@resource-id='network.loki.messenger:id/callTitle' and contains(@text, ':')]` | `//*[starts-with(@content-desc, "Photo taken on")]` - | `//android.view.ViewGroup[@resource-id='network.loki.messenger.qa:id/mainContainer'][.//android.widget.TextView[contains(@text,'${string}')]]//androidx.compose.ui.platform.ComposeView[@resource-id='network.loki.messenger.qa:id/profilePictureView']` - | `//android.view.ViewGroup[@resource-id="network.loki.messenger.qa:id/mainContainer"][.//android.widget.TextView[contains(@text,"${string}")]]//android.view.ViewGroup[@resource-id="network.loki.messenger.qa:id/layout_emoji_container"]` - | `//android.view.ViewGroup[@resource-id="network.loki.messenger.qa:id/mainContainer"][.//android.widget.TextView[contains(@text,"${string}")]]//android.widget.TextView[@resource-id="network.loki.messenger.qa:id/reactions_pill_count"][@text="${string}"]` - | `//android.widget.LinearLayout[.//android.widget.TextView[@content-desc="Conversation list item" and @text="${string}"]]//android.widget.TextView[@resource-id="network.loki.messenger.qa:id/snippetTextView" and @text="${string}"]` + | `//android.view.ViewGroup[@resource-id='network.loki.messenger:id/mainContainer'][.//android.widget.TextView[contains(@text,'${string}')]]//androidx.compose.ui.platform.ComposeView[@resource-id='network.loki.messenger:id/profilePictureView']` + | `//android.view.ViewGroup[@resource-id="network.loki.messenger:id/mainContainer"][.//android.widget.TextView[contains(@text,"${string}")]]//android.view.ViewGroup[@resource-id="network.loki.messenger:id/layout_emoji_container"]` + | `//android.view.ViewGroup[@resource-id="network.loki.messenger:id/mainContainer"][.//android.widget.TextView[contains(@text,"${string}")]]//android.widget.TextView[@resource-id="network.loki.messenger:id/reactions_pill_count"][@text="${string}"]` + | `//android.widget.LinearLayout[.//android.widget.TextView[@content-desc="Conversation list item" and @text="${string}"]]//android.widget.TextView[@resource-id="network.loki.messenger:id/snippetTextView" and @text="${string}"]` | `//android.widget.TextView[@text="${string}"]` | `//android.widget.TextView[@text="Message"]/parent::android.view.View` | `//XCUIElementTypeAlert//*//XCUIElementTypeButton` @@ -169,7 +169,7 @@ export type UiAutomatorQuery = | 'new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().resourceId("path-menu-item"))' | 'new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().text("Select app icon"))' | 'new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().textStartsWith("Version"))' - | 'new UiSelector().resourceId("network.loki.messenger.qa:id/messageStatusTextView").text("Sent")' + | 'new UiSelector().resourceId("network.loki.messenger:id/messageStatusTextView").text("Sent")' | 'new UiSelector().text("Enter your display name")' | `new UiSelector().resourceId("Conversation header name").childSelector(new UiSelector().resourceId("pro-badge-text"))` | `new UiSelector().text(${string})`; @@ -497,7 +497,7 @@ export type Id = | 'Hide recovery password button' | 'Image button' | 'Image picker' - | 'invite-contacts-button' + | 'qa-collapsing-footer-action_invite' | 'invite-contacts-menu-option' | 'Invite button' | 'Invite friend button' @@ -515,36 +515,36 @@ export type Id = | 'Modal description' | 'Modal heading' | 'Navigate back' - | 'network.loki.messenger.qa:id/acceptCallButton' - | 'network.loki.messenger.qa:id/action_apply' - | 'network.loki.messenger.qa:id/back_button' - | 'network.loki.messenger.qa:id/call_text_view' - | 'network.loki.messenger.qa:id/callInProgress' - | 'network.loki.messenger.qa:id/callSubtitle' - | 'network.loki.messenger.qa:id/callTitle' - | 'network.loki.messenger.qa:id/characterLimitText' - | 'network.loki.messenger.qa:id/crop_image_menu_crop' - | 'network.loki.messenger.qa:id/emptyStateContainer' - | 'network.loki.messenger.qa:id/endCallButton' - | 'network.loki.messenger.qa:id/layout_emoji_container' - | 'network.loki.messenger.qa:id/linkPreviewView' - | 'network.loki.messenger.qa:id/mediapicker_folder_item_thumbnail' - | 'network.loki.messenger.qa:id/mediapicker_image_item_thumbnail' - | 'network.loki.messenger.qa:id/messageStatusTextView' - | 'network.loki.messenger.qa:id/openGroupTitleTextView' - | 'network.loki.messenger.qa:id/play_overlay' - | 'network.loki.messenger.qa:id/reaction_1' - | 'network.loki.messenger.qa:id/reactions_pill_count' - | 'network.loki.messenger.qa:id/scrollToBottomButton' - | 'network.loki.messenger.qa:id/search_cancel' - | 'network.loki.messenger.qa:id/search_result_title' - | 'network.loki.messenger.qa:id/sendAcceptsTextView' - | 'network.loki.messenger.qa:id/singleModeImageView' - | 'network.loki.messenger.qa:id/system_settings_app_icon' - | 'network.loki.messenger.qa:id/textSendAfterApproval' - | 'network.loki.messenger.qa:id/theme_option_classic_light' - | 'network.loki.messenger.qa:id/thumbnail_load_indicator' - | 'network.loki.messenger.qa:id/title' + | 'network.loki.messenger:id/acceptCallButton' + | 'network.loki.messenger:id/action_apply' + | 'network.loki.messenger:id/back_button' + | 'network.loki.messenger:id/call_text_view' + | 'network.loki.messenger:id/callInProgress' + | 'network.loki.messenger:id/callSubtitle' + | 'network.loki.messenger:id/callTitle' + | 'network.loki.messenger:id/characterLimitText' + | 'network.loki.messenger:id/crop_image_menu_crop' + | 'network.loki.messenger:id/emptyStateContainer' + | 'network.loki.messenger:id/endCallButton' + | 'network.loki.messenger:id/layout_emoji_container' + | 'network.loki.messenger:id/linkPreviewView' + | 'network.loki.messenger:id/mediapicker_folder_item_thumbnail' + | 'network.loki.messenger:id/mediapicker_image_item_thumbnail' + | 'network.loki.messenger:id/messageStatusTextView' + | 'network.loki.messenger:id/openGroupTitleTextView' + | 'network.loki.messenger:id/play_overlay' + | 'network.loki.messenger:id/reaction_1' + | 'network.loki.messenger:id/reactions_pill_count' + | 'network.loki.messenger:id/scrollToBottomButton' + | 'network.loki.messenger:id/search_cancel' + | 'network.loki.messenger:id/search_result_title' + | 'network.loki.messenger:id/sendAcceptsTextView' + | 'network.loki.messenger:id/singleModeImageView' + | 'network.loki.messenger:id/system_settings_app_icon' + | 'network.loki.messenger:id/textSendAfterApproval' + | 'network.loki.messenger:id/theme_option_classic_light' + | 'network.loki.messenger:id/thumbnail_load_indicator' + | 'network.loki.messenger:id/title' | 'New direct message' | 'Next' | 'nickname-input' @@ -556,7 +556,7 @@ export type Id = | 'Open URL' | 'preferred-display-name' | 'Privacy' - | 'Privacy Policy' + | 'Privacy policy button' | 'pro-badge-text' | 'Quit' | 'rate-app-button' @@ -579,7 +579,7 @@ export type Id = | 'Show' | 'Slow mode notifications button' | 'Staking reward pool amount' - | 'Terms of Service' + | 'Terms of service button' | 'update-group-info-confirm-button' | 'update-group-info-description-input' | 'update-group-info-name-input'