diff --git a/examples/E2ETestApp/e2e/README.md b/examples/E2ETestApp/e2e/README.md index 28061827e5..3695a4201c 100644 --- a/examples/E2ETestApp/e2e/README.md +++ b/examples/E2ETestApp/e2e/README.md @@ -88,7 +88,6 @@ test names and expectations. Where the SDK disagrees with the native expectation grouped channel lists, channel/message/member search, reminders, push notifications (app-level in RN), Android's `BackendTests` (real backend), hard delete from the message menu, iOS read counts and the iOS scroll performance tests. Tests that cut the network run only on Android (`itOnAndroid`): the iOS simulator shares the Mac's connection. -Tests that take the Android CI emulator down run only on iOS (`itOnIOS`), with a comment linking the ticket. ## Impact analysis diff --git a/examples/E2ETestApp/e2e/robots/UserRobotMessageListAsserts.ts b/examples/E2ETestApp/e2e/robots/UserRobotMessageListAsserts.ts index 278e33824c..a360709ce0 100644 --- a/examples/E2ETestApp/e2e/robots/UserRobotMessageListAsserts.ts +++ b/examples/E2ETestApp/e2e/robots/UserRobotMessageListAsserts.ts @@ -173,10 +173,16 @@ UserRobot.prototype.assertMessageDeliveryStatus = function (status, count) { case MessageDeliveryStatus.FAILED: return assertFailedIcon(true, count); case MessageDeliveryStatus.NIL: - await assertVisibility(Message.deliveryStatusIsRead, false); - await assertVisibility(Message.deliveryStatusIsDelivered, false); - await assertVisibility(Message.deliveryStatusIsPending, false); - await assertVisibility(Message.deliveryStatusIsSent, false); + // Only the list's message cells: a thread's parent message sits above the replies outside + // any cell (ThreadFooterComponent) and shows its own status. + for (const status of [ + Message.deliveryStatusIsRead, + Message.deliveryStatusIsDelivered, + Message.deliveryStatusIsPending, + Message.deliveryStatusIsSent, + ]) { + await assertVisibility(status.withAncestor(MessageList.messages), false); + } return; default: throw new Error(`Unsupported delivery status: ${status}`); diff --git a/examples/E2ETestApp/e2e/support/StreamTestCase.ts b/examples/E2ETestApp/e2e/support/StreamTestCase.ts index 1b32d810b6..c1785726bf 100644 --- a/examples/E2ETestApp/e2e/support/StreamTestCase.ts +++ b/examples/E2ETestApp/e2e/support/StreamTestCase.ts @@ -113,13 +113,6 @@ export const itOnAndroid: typeof it = ((name: string, fn: () => Promise, t ? it(name, fn, timeout) : it.skip(name, fn, timeout)) as typeof it; -/** - * `it` on iOS, `it.skip` on Android: for tests that take the Android CI emulator down with them - * (RN-513). Name the ticket in a comment above each one. - */ -export const itOnIOS: typeof it = ((name: string, fn: () => Promise, timeout?: number) => - device.getPlatform() === 'ios' ? it(name, fn, timeout) : it.skip(name, fn, timeout)) as typeof it; - /** * `it`, except `it.skip` on iOS below 18: for tests that hit an SDK bug only older iOS versions * show. Name the ticket in a comment above each one. Runs when the version can't be read. diff --git a/examples/E2ETestApp/e2e/tests/GiphyTests.e2e.ts b/examples/E2ETestApp/e2e/tests/GiphyTests.e2e.ts index 4a6eaec2b6..20b9ee5213 100644 --- a/examples/E2ETestApp/e2e/tests/GiphyTests.e2e.ts +++ b/examples/E2ETestApp/e2e/tests/GiphyTests.e2e.ts @@ -2,13 +2,12 @@ import { describe, it } from '@jest/globals'; import { MessageDeliveryStatus } from '../mock-server/DataTypes'; import { allureId, step } from '../support/step'; -import { itOnIOS, setUpStreamTestCase } from '../support/StreamTestCase'; +import { setUpStreamTestCase } from '../support/StreamTestCase'; describe('GiphyTests', () => { const { backendRobot, participantRobot, userRobot } = setUpStreamTestCase(); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_userObservesAnimatedGiphy_whenUserAddsGiphyMessage', async () => { + it('test_userObservesAnimatedGiphy_whenUserAddsGiphyMessage', async () => { allureId(13081); await step('GIVEN user opens a channel', () => userRobot.login().openChannel()); await step('WHEN user sends a giphy using giphy command', () => userRobot.uploadGiphy()); @@ -17,16 +16,14 @@ describe('GiphyTests', () => { ); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_userObservesAnimatedGiphy_whenParticipantAddsGiphyMessage', async () => { + it('test_userObservesAnimatedGiphy_whenParticipantAddsGiphyMessage', async () => { allureId(13082); await step('GIVEN user opens a channel', () => userRobot.login().openChannel()); await step('WHEN participant sends a giphy', () => participantRobot.uploadGiphy()); await step('THEN user observes the animated gif', () => userRobot.assertGiphyImage()); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_userObservesAnimatedGiphy_whenUserAddsGiphyMessageInThread', async () => { + it('test_userObservesAnimatedGiphy_whenUserAddsGiphyMessageInThread', async () => { allureId(13083); await step('GIVEN user opens a channel', async () => { await backendRobot.generateChannels({ channelsCount: 1, messagesCount: 1 }); @@ -38,8 +35,7 @@ describe('GiphyTests', () => { await step('THEN user observes the animated gif in thread', () => userRobot.assertGiphyImage()); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_userObservesAnimatedGiphy_whenParticipantAddsGiphyMessageInThread', async () => { + it('test_userObservesAnimatedGiphy_whenParticipantAddsGiphyMessageInThread', async () => { allureId(13084); await step('GIVEN user opens a channel', async () => { await backendRobot.generateChannels({ channelsCount: 1, messagesCount: 1 }); @@ -54,8 +50,7 @@ describe('GiphyTests', () => { ); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_userObservesAnimatedGiphy_afterAddingGiphyThroughComposerMenu', async () => { + it('test_userObservesAnimatedGiphy_afterAddingGiphyThroughComposerMenu', async () => { allureId(13085); await step('GIVEN user opens a channel', () => userRobot.login().openChannel()); await step('WHEN user sends a giphy using the command suggestions', () => @@ -64,8 +59,7 @@ describe('GiphyTests', () => { await step('THEN user observes the animated gif', () => userRobot.assertGiphyImage()); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_userObservesAnimatedGiphy_whenUserAddsGiphyMessage_AfterShuffling', async () => { + it('test_userObservesAnimatedGiphy_whenUserAddsGiphyMessage_AfterShuffling', async () => { allureId(13086); await step('GIVEN user opens a channel', () => userRobot.login().openChannel()); await step('WHEN user shuffles a giphy', () => @@ -80,8 +74,7 @@ describe('GiphyTests', () => { ); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_messageIsNotSent_whenUserCancelsEphemeralMessage', async () => { + it('test_messageIsNotSent_whenUserCancelsEphemeralMessage', async () => { allureId(13087); await step('GIVEN user opens a channel', () => userRobot.login().openChannel()); await step('WHEN user cancels a giphy', () => @@ -126,8 +119,7 @@ describe('GiphyTests', () => { ); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_deliveryStatusHidden_whenEphemeralMessageShown', async () => { + it('test_deliveryStatusHidden_whenEphemeralMessageShown', async () => { allureId(13090); await step('GIVEN user opens a channel', () => userRobot.login().openChannel()); await step('WHEN user runs a giphy command', () => @@ -140,8 +132,7 @@ describe('GiphyTests', () => { ); }); - // https://linear.app/stream/issue/RN-513 - itOnIOS('test_deliveryStatusHidden_whenEphemeralMessageShownInThread', async () => { + it('test_deliveryStatusHidden_whenEphemeralMessageShownInThread', async () => { allureId(13091); await step('GIVEN user opens a channel', async () => { await backendRobot.generateChannels({ channelsCount: 1, messagesCount: 1 }); diff --git a/examples/SampleApp/fastlane/Fastfile b/examples/SampleApp/fastlane/Fastfile index 42baf1e14c..6240e4e796 100644 --- a/examples/SampleApp/fastlane/Fastfile +++ b/examples/SampleApp/fastlane/Fastfile @@ -344,13 +344,13 @@ lane :e2e_check_required do end # `/` ids of the tests that can run, e.g. `MessageListTests.e2e/test_x`: the coverage -# map's keys. `it.skip` tests are left out; `itOnAndroid`, `itOnIOS` and `itExceptOnOldIOS` ones are -# in (Jest skips them where they don't run). +# map's keys. `it.skip` tests are left out; `itOnAndroid` and `itExceptOnOldIOS` ones are in (Jest +# skips them where they don't run). def e2e_test_ids(tests_path) Dir.glob(File.join(tests_path, '*.e2e.ts')).sort.flat_map do |file| source = File.read(file) - calls = source.scan(/^\s*(?:it|itOnAndroid|itOnIOS|itExceptOnOldIOS)(?:\.skip)?\(/).size - tests = source.scan(/^\s*(?:it|itOnAndroid|itOnIOS|itExceptOnOldIOS)(\.skip)?\(\s*'(test_\w+)'/) + calls = source.scan(/^\s*(?:it|itOnAndroid|itExceptOnOldIOS)(?:\.skip)?\(/).size + tests = source.scan(/^\s*(?:it|itOnAndroid|itExceptOnOldIOS)(\.skip)?\(\s*'(test_\w+)'/) # A test this misses would never run on a pull request, so fail loudly instead. UI.user_error!("#{file}: read #{tests.size} of its #{calls} tests; name each one with a `test_*` literal") if tests.size != calls