From dd6025736445a6180561577239e88da8dc8244fa Mon Sep 17 00:00:00 2001 From: Joseph Baylon Date: Fri, 30 Dec 2022 14:01:24 -0800 Subject: [PATCH] Detox/E2E Maintenance: Fix broken iOS e2e tests (#6917) --- app/screens/settings/report_problem/report_problem.tsx | 2 +- detox/e2e/support/ui/screen/settings.ts | 2 ++ detox/e2e/test/account/custom_status.e2e.ts | 2 +- detox/e2e/test/account/settings.e2e.ts | 1 + detox/e2e/test/channels/channel_info.e2e.ts | 2 -- detox/e2e/test/channels/channel_post_list.e2e.ts | 1 - detox/e2e/test/smoke_test/account.e2e.ts | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/screens/settings/report_problem/report_problem.tsx b/app/screens/settings/report_problem/report_problem.tsx index ca9abe7b28..acb02cb12c 100644 --- a/app/screens/settings/report_problem/report_problem.tsx +++ b/app/screens/settings/report_problem/report_problem.tsx @@ -61,7 +61,7 @@ const ReportProblem = ({buildNumber, currentTeamId, currentUserId, siteName, sup onPress={openEmailClient} optionName='report_problem' separator={false} - testID='settings.report.problem' + testID='settings.report_problem.option' type='default' /> ); diff --git a/detox/e2e/support/ui/screen/settings.ts b/detox/e2e/support/ui/screen/settings.ts index 4ee9b5b5f8..735e870528 100644 --- a/detox/e2e/support/ui/screen/settings.ts +++ b/detox/e2e/support/ui/screen/settings.ts @@ -15,6 +15,7 @@ class SettingsScreen { advancedSettingsOption: 'settings.advanced_settings.option', aboutOption: 'settings.about.option', helpOption: 'settings.help.option', + reportProblemOption: 'settings.report_problem.option', }; settingsScreen = element(by.id(this.testID.settingsScreen)); @@ -25,6 +26,7 @@ class SettingsScreen { advancedSettingsOption = element(by.id(this.testID.advancedSettingsOption)); aboutOption = element(by.id(this.testID.aboutOption)); helpOption = element(by.id(this.testID.helpOption)); + reportProblemOption = element(by.id(this.testID.reportProblemOption)); toBeVisible = async () => { await waitFor(this.settingsScreen).toExist().withTimeout(timeouts.TEN_SEC); diff --git a/detox/e2e/test/account/custom_status.e2e.ts b/detox/e2e/test/account/custom_status.e2e.ts index fdcabc8153..106f99c2cd 100644 --- a/detox/e2e/test/account/custom_status.e2e.ts +++ b/detox/e2e/test/account/custom_status.e2e.ts @@ -154,7 +154,7 @@ describe('Account - Custom Status', () => { await AccountScreen.customStatusClearButton.tap(); // * Verify custom status is cleared from account screen - const defaultStatusText = 'Set a Status'; + const defaultStatusText = 'Set a custom status'; const {accountCustomStatusEmoji, accountCustomStatusText, accountCustomStatusExpiry} = AccountScreen.getCustomStatus(customStatusEmojiName, customStatusDuration); await expect(accountCustomStatusEmoji).not.toExist(); await expect(accountCustomStatusText).toHaveText(defaultStatusText); diff --git a/detox/e2e/test/account/settings.e2e.ts b/detox/e2e/test/account/settings.e2e.ts index c6a1266585..8a48da8b4c 100644 --- a/detox/e2e/test/account/settings.e2e.ts +++ b/detox/e2e/test/account/settings.e2e.ts @@ -58,6 +58,7 @@ describe('Account - Settings', () => { await expect(SettingsScreen.advancedSettingsOption).toBeVisible(); await expect(SettingsScreen.aboutOption).toBeVisible(); await expect(SettingsScreen.helpOption).toBeVisible(); + await expect(SettingsScreen.reportProblemOption).toBeVisible(); }); it('MM-T4991_2 - should be able to go to notification settings screen', async () => { diff --git a/detox/e2e/test/channels/channel_info.e2e.ts b/detox/e2e/test/channels/channel_info.e2e.ts index 87b772e884..246fd60685 100644 --- a/detox/e2e/test/channels/channel_info.e2e.ts +++ b/detox/e2e/test/channels/channel_info.e2e.ts @@ -59,11 +59,9 @@ describe('Channels - Channel Info', () => { await expect(element(by.text(`Channel header: ${testChannel.display_name.toLowerCase()}`))).toBeVisible(); await expect(ChannelInfoScreen.favoriteAction).toBeVisible(); await expect(ChannelInfoScreen.muteAction).toBeVisible(); - await expect(ChannelInfoScreen.addPeopleAction).toBeVisible(); await expect(ChannelInfoScreen.joinStartCallAction).toBeVisible(); await expect(ChannelInfoScreen.ignoreMentionsOptionToggledOff).toBeVisible(); await expect(ChannelInfoScreen.pinnedMessagesOption).toBeVisible(); - await expect(ChannelInfoScreen.membersOption).toBeVisible(); await expect(ChannelInfoScreen.copyChannelLinkOption).toBeVisible(); await expect(ChannelInfoScreen.editChannelOption).toBeVisible(); await expect(ChannelInfoScreen.leaveChannelOption).toBeVisible(); diff --git a/detox/e2e/test/channels/channel_post_list.e2e.ts b/detox/e2e/test/channels/channel_post_list.e2e.ts index 9b0758b83c..ee9b23b2c0 100644 --- a/detox/e2e/test/channels/channel_post_list.e2e.ts +++ b/detox/e2e/test/channels/channel_post_list.e2e.ts @@ -57,7 +57,6 @@ describe('Channels - Channel Post List', () => { await expect(ChannelScreen.backButton).toBeVisible(); await expect(ChannelScreen.headerTitle).toHaveText(testChannel.display_name); await expect(ChannelScreen.introDisplayName).toHaveText(testChannel.display_name); - await expect(ChannelScreen.introAddPeopleAction).toBeVisible(); await expect(ChannelScreen.introSetHeaderAction).toBeVisible(); await expect(ChannelScreen.introChannelInfoAction).toBeVisible(); await expect(ChannelScreen.postList.getFlatList()).toBeVisible(); diff --git a/detox/e2e/test/smoke_test/account.e2e.ts b/detox/e2e/test/smoke_test/account.e2e.ts index c980044a61..7b9ce6567e 100644 --- a/detox/e2e/test/smoke_test/account.e2e.ts +++ b/detox/e2e/test/smoke_test/account.e2e.ts @@ -88,7 +88,7 @@ describe('Smoke Test - Account', () => { await AccountScreen.customStatusClearButton.tap(); // * Verify custom status is cleared from account screen - const defaultStatusText = 'Set a Status'; + const defaultStatusText = 'Set a custom status'; await expect(accountCustomStatusEmoji).not.toExist(); await expect(accountCustomStatusText).toHaveText(defaultStatusText); await expect(accountCustomStatusExpiry).not.toExist();