diff --git a/fixture/.detoxrc.js b/fixture/.detoxrc.js index e53ca75bf..4acacd8d3 100644 --- a/fixture/.detoxrc.js +++ b/fixture/.detoxrc.js @@ -8,7 +8,7 @@ module.exports = { testRunner: { $0: "jest", args: { - config: "e2e/config.js", + config: "e2e/jest.config.js", }, }, apps: { @@ -30,7 +30,7 @@ module.exports = { simulator: { type: "ios.simulator", device: { - type: "iPhone 11", + type: "iPhone 14", }, }, emulator: { diff --git a/fixture/e2e/artifacts/ios/FlashList_Contacts_with_FlashList_looks_the_same/FlashList_Contacts_with_FlashList_looks_the_same.png b/fixture/e2e/artifacts/ios/FlashList_Contacts_with_FlashList_looks_the_same/FlashList_Contacts_with_FlashList_looks_the_same.png index 332763dab..f26c060c4 100644 Binary files a/fixture/e2e/artifacts/ios/FlashList_Contacts_with_FlashList_looks_the_same/FlashList_Contacts_with_FlashList_looks_the_same.png and b/fixture/e2e/artifacts/ios/FlashList_Contacts_with_FlashList_looks_the_same/FlashList_Contacts_with_FlashList_looks_the_same.png differ diff --git a/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_load/Masonry_with_FlashList_can_load.png b/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_load/Masonry_with_FlashList_can_load.png index 3b63a1248..6283ae315 100644 Binary files a/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_load/Masonry_with_FlashList_can_load.png and b/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_load/Masonry_with_FlashList_can_load.png differ diff --git a/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_scroll/Masonry_with_FlashList_can_scroll.png b/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_scroll/Masonry_with_FlashList_can_scroll.png index 2a2cfb662..08d7f1e9c 100644 Binary files a/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_scroll/Masonry_with_FlashList_can_scroll.png and b/fixture/e2e/artifacts/ios/Masonry_with_FlashList_can_scroll/Masonry_with_FlashList_can_scroll.png differ diff --git a/fixture/e2e/artifacts/ios/SectionList_Contacts_with_FlashList_looks_the_same/SectionList_Contacts_with_FlashList_looks_the_same.png b/fixture/e2e/artifacts/ios/SectionList_Contacts_with_FlashList_looks_the_same/SectionList_Contacts_with_FlashList_looks_the_same.png index 332763dab..f26c060c4 100644 Binary files a/fixture/e2e/artifacts/ios/SectionList_Contacts_with_FlashList_looks_the_same/SectionList_Contacts_with_FlashList_looks_the_same.png and b/fixture/e2e/artifacts/ios/SectionList_Contacts_with_FlashList_looks_the_same/SectionList_Contacts_with_FlashList_looks_the_same.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped.png b/fixture/e2e/artifacts/ios/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped.png index 44e5a5808..15cf07497 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped.png and b/fixture/e2e/artifacts/ios/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped/Twitter_goes_to_Tweet_detail_after_tweet_cell_is_tapped.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_is_updated_after_refreshed/Twitter_is_updated_after_refreshed.png b/fixture/e2e/artifacts/ios/Twitter_is_updated_after_refreshed/Twitter_is_updated_after_refreshed.png index b125777a3..10552f525 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_is_updated_after_refreshed/Twitter_is_updated_after_refreshed.png and b/fixture/e2e/artifacts/ios/Twitter_is_updated_after_refreshed/Twitter_is_updated_after_refreshed.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list.png b/fixture/e2e/artifacts/ios/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list.png index c063013b7..83e7f653a 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list.png and b/fixture/e2e/artifacts/ios/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list/Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_looks_the_same_after_orientation_change/Twitter_looks_the_same_after_orientation_change.png b/fixture/e2e/artifacts/ios/Twitter_looks_the_same_after_orientation_change/Twitter_looks_the_same_after_orientation_change.png index 4823a28eb..28efb9443 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_looks_the_same_after_orientation_change/Twitter_looks_the_same_after_orientation_change.png and b/fixture/e2e/artifacts/ios/Twitter_looks_the_same_after_orientation_change/Twitter_looks_the_same_after_orientation_change.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_with_FlashList_looks_the_same/Twitter_with_FlashList_looks_the_same.png b/fixture/e2e/artifacts/ios/Twitter_with_FlashList_looks_the_same/Twitter_with_FlashList_looks_the_same.png index 76537e645..456483dbc 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_with_FlashList_looks_the_same/Twitter_with_FlashList_looks_the_same.png and b/fixture/e2e/artifacts/ios/Twitter_with_FlashList_looks_the_same/Twitter_with_FlashList_looks_the_same.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_with_FlatList_looks_the_same_as_with_FlashList/Twitter_with_FlatList_looks_the_same_as_with_FlashList.png b/fixture/e2e/artifacts/ios/Twitter_with_FlatList_looks_the_same_as_with_FlashList/Twitter_with_FlatList_looks_the_same_as_with_FlashList.png index 76537e645..a9852b16e 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_with_FlatList_looks_the_same_as_with_FlashList/Twitter_with_FlatList_looks_the_same_as_with_FlashList.png and b/fixture/e2e/artifacts/ios/Twitter_with_FlatList_looks_the_same_as_with_FlashList/Twitter_with_FlatList_looks_the_same_as_with_FlashList.png differ diff --git a/fixture/e2e/artifacts/ios/Twitter_with_empty_list_looks_the_same/Twitter_with_empty_list_looks_the_same.png b/fixture/e2e/artifacts/ios/Twitter_with_empty_list_looks_the_same/Twitter_with_empty_list_looks_the_same.png index 6a55b3e25..071eb7b78 100644 Binary files a/fixture/e2e/artifacts/ios/Twitter_with_empty_list_looks_the_same/Twitter_with_empty_list_looks_the_same.png and b/fixture/e2e/artifacts/ios/Twitter_with_empty_list_looks_the_same/Twitter_with_empty_list_looks_the_same.png differ diff --git a/fixture/e2e/artifacts/ios/with_FlatList_Twitter_with_empty_list_looks_the_same/with_FlatList_Twitter_with_empty_list_looks_the_same.png b/fixture/e2e/artifacts/ios/with_FlatList_Twitter_with_empty_list_looks_the_same/with_FlatList_Twitter_with_empty_list_looks_the_same.png index 6a55b3e25..071eb7b78 100644 Binary files a/fixture/e2e/artifacts/ios/with_FlatList_Twitter_with_empty_list_looks_the_same/with_FlatList_Twitter_with_empty_list_looks_the_same.png and b/fixture/e2e/artifacts/ios/with_FlatList_Twitter_with_empty_list_looks_the_same/with_FlatList_Twitter_with_empty_list_looks_the_same.png differ diff --git a/fixture/e2e/config.js b/fixture/e2e/config.js deleted file mode 100644 index 2578d6b5b..000000000 --- a/fixture/e2e/config.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - maxWorkers: 1, - testEnvironment: "./environment", - testRunner: "jest-circus/runner", - testTimeout: 120000, - testRegex: "\\.e2e\\.(js|ts)$", - reporters: ["detox/runners/jest/streamlineReporter"], - verbose: true, - preset: "react-native", -}; diff --git a/fixture/e2e/environment.js b/fixture/e2e/environment.js deleted file mode 100644 index ed45b697f..000000000 --- a/fixture/e2e/environment.js +++ /dev/null @@ -1,19 +0,0 @@ -const { - DetoxCircusEnvironment, - SpecReporter, - WorkerAssignReporter, -} = require("detox/runners/jest-circus"); - -class CustomDetoxEnvironment extends DetoxCircusEnvironment { - constructor(config, context) { - super(config, context); - // This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level. - // This is strictly optional. - this.registerListeners({ - SpecReporter, - WorkerAssignReporter, - }); - } -} - -module.exports = CustomDetoxEnvironment; diff --git a/fixture/e2e/jest.config.js b/fixture/e2e/jest.config.js new file mode 100644 index 000000000..98d688e1b --- /dev/null +++ b/fixture/e2e/jest.config.js @@ -0,0 +1,13 @@ +/** @type {import('@jest/types').Config.InitialOptions} */ +module.exports = { + preset: "react-native", + rootDir: "..", + testMatch: ["/e2e/**/*.test.e2e.ts"], + testTimeout: 120000, + maxWorkers: 1, + globalSetup: "detox/runners/jest/globalSetup", + globalTeardown: "detox/runners/jest/globalTeardown", + reporters: ["detox/runners/jest/reporter"], + testEnvironment: "detox/runners/jest/testEnvironment", + verbose: true, +}; diff --git a/fixture/e2e/Contacts.test.e2e.ts b/fixture/e2e/tests/Contacts.test.e2e.ts similarity index 85% rename from fixture/e2e/Contacts.test.e2e.ts rename to fixture/e2e/tests/Contacts.test.e2e.ts index 65b8f43ea..06a2103b3 100644 --- a/fixture/e2e/Contacts.test.e2e.ts +++ b/fixture/e2e/tests/Contacts.test.e2e.ts @@ -1,6 +1,6 @@ -import goBack from "./utils/goBack"; -import { assertSnapshot, assertSnapshotsEqual } from "./utils/SnapshotAsserts"; -import { reference, wipeArtifactsLocation } from "./utils/SnapshotLocation"; +import goBack from "../utils/goBack"; +import { assertSnapshot, assertSnapshotsEqual } from "../utils/SnapshotAsserts"; +import { reference, wipeArtifactsLocation } from "../utils/SnapshotLocation"; describe("Contacts", () => { beforeAll(async () => { diff --git a/fixture/e2e/Masonry.test.e2e.ts b/fixture/e2e/tests/Masonry.test.e2e.ts similarity index 88% rename from fixture/e2e/Masonry.test.e2e.ts rename to fixture/e2e/tests/Masonry.test.e2e.ts index 01c5fce83..070a195d5 100644 --- a/fixture/e2e/Masonry.test.e2e.ts +++ b/fixture/e2e/tests/Masonry.test.e2e.ts @@ -1,5 +1,5 @@ -import { assertSnapshot } from "./utils/SnapshotAsserts"; -import { wipeArtifactsLocation } from "./utils/SnapshotLocation"; +import { assertSnapshot } from "../utils/SnapshotAsserts"; +import { wipeArtifactsLocation } from "../utils/SnapshotLocation"; describe("Masonry", () => { const testNameLoad = "Masonry_with_FlashList_can_load"; diff --git a/fixture/e2e/Twitter.test.e2e.ts b/fixture/e2e/tests/Twitter.test.e2e.ts similarity index 90% rename from fixture/e2e/Twitter.test.e2e.ts rename to fixture/e2e/tests/Twitter.test.e2e.ts index 3ad653c92..02f7a14e1 100644 --- a/fixture/e2e/Twitter.test.e2e.ts +++ b/fixture/e2e/tests/Twitter.test.e2e.ts @@ -1,9 +1,8 @@ /* eslint-disable @shopify/strict-component-boundaries */ -import { DebugOption } from "../src/Debug/DebugOptions"; - -import { assertSnapshotsEqual, assertSnapshot } from "./utils/SnapshotAsserts"; -import { wipeArtifactsLocation, reference } from "./utils/SnapshotLocation"; -import goBack from "./utils/goBack"; +import { DebugOption } from "../../src/Debug/DebugOptions"; +import { assertSnapshotsEqual, assertSnapshot } from "../utils/SnapshotAsserts"; +import { wipeArtifactsLocation, reference } from "../utils/SnapshotLocation"; +import goBack from "../utils/goBack"; describe("Twitter", () => { const flashListReferenceTestName = "Twitter_with_FlashList_looks_the_same"; @@ -48,8 +47,7 @@ describe("Twitter", () => { ); }); - // eslint-disable-next-line jest/no-disabled-tests - it.skip("looks the same after orientation change", async () => { + it("looks the same after orientation change", async () => { const testName = "Twitter_looks_the_same_after_orientation_change"; const flatListTestName = `with_FlatList_${testName}`; @@ -95,8 +93,8 @@ describe("Twitter", () => { }); // Temporarily disabled due to failures, can be fixed after RN upgrade - // eslint-disable-next-line jest/no-disabled-tests - it.skip("loads a new page when gets to the bottom of the list", async () => { + + it("loads a new page when gets to the bottom of the list", async () => { const testName = "Twitter_loads_a_new_page_when_gets_to_the_bottom_of_the_list"; await enableDebugOption(DebugOption.PagingEnabled); diff --git a/fixture/ios/Podfile b/fixture/ios/Podfile index 70839f937..3630c38f0 100644 --- a/fixture/ios/Podfile +++ b/fixture/ios/Podfile @@ -19,7 +19,8 @@ inhibit_all_warnings! # dependencies: { # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), # ``` -flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled +# We Enable Flipper in Release builds as well so we can run E2E tests due to our dependency on `react-native-flipper` +flipper_config = FlipperConfiguration.enabled(["Debug", "Release"], { 'Flipper' => '0.182.0'}) linkage = ENV['USE_FRAMEWORKS'] if linkage != nil diff --git a/fixture/ios/Podfile.lock b/fixture/ios/Podfile.lock index 676c260cf..95620295c 100644 --- a/fixture/ios/Podfile.lock +++ b/fixture/ios/Podfile.lock @@ -387,7 +387,7 @@ PODS: - React-jsinspector (0.72.10) - React-logger (0.72.10): - glog - - react-native-flipper (0.212.0): + - react-native-flipper (0.182.0): - React-Core - react-native-safe-area-context (3.3.2): - React-Core @@ -757,7 +757,7 @@ SPEC CHECKSUMS: React-jsiexecutor: 45ef2ec6dcde31b90469175ec76ddac77b91dfc3 React-jsinspector: de0198127395fec3058140a20c045167f761bb16 React-logger: dc3a2b174d79c2da635059212747d8d929b54e06 - react-native-flipper: 9c1957af24b76493ba74f46d000a5c1d485e7731 + react-native-flipper: 6e4e344a0104a34a4e189a9ef2b3b5634b516dc8 react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057 React-NativeModulesApple: c3e696ff867e4bc212266cbdf7e862e48a0166fd React-perflogger: 43287389ea08993c300897a46f95cfac04bb6c1a @@ -788,6 +788,6 @@ SPEC CHECKSUMS: Yoga: d0003f849d2b5224c072cef6568b540d8bb15cd3 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: a33b896298fa0b0d77bde3376427140fab57162b +PODFILE CHECKSUM: de08e73598d1ff7473faa548bd44f290ef696f2f COCOAPODS: 1.11.3 diff --git a/fixture/package.json b/fixture/package.json index 7cd4cc93f..4c9330fd4 100644 --- a/fixture/package.json +++ b/fixture/package.json @@ -21,7 +21,7 @@ "react": "18.2.0", "react-native": "0.72.10", "react-native-fast-image": "^8.5.11", - "react-native-flipper": "^0.212.0", + "react-native-flipper": "0.182.0", "react-native-gesture-handler": "^2.5.0", "react-native-reanimated": "3.6.1", "react-native-safe-area-context": "^3.3.2", diff --git a/fixture/yarn.lock b/fixture/yarn.lock index 98346b985..d7be51ba2 100644 --- a/fixture/yarn.lock +++ b/fixture/yarn.lock @@ -5077,10 +5077,10 @@ react-native-fast-image@^8.5.11: resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.5.11.tgz#e3dc969d0e4e8df026646bf18194465aa55cbc2b" integrity sha512-cNW4bIJg3nvKaheG8vGMfqCt5LMWX9MS5+wMudgKIHbGO51spRr4sgnlhVgwHLcZ5aeNOVJ8CPRxDIWKRq/0QA== -react-native-flipper@^0.212.0: - version "0.212.0" - resolved "https://registry.yarnpkg.com/react-native-flipper/-/react-native-flipper-0.212.0.tgz#b3fdd47676ecd09a25edd77a1466acace6276762" - integrity sha512-bDRfIgE3v/jjEEdnvGP0T6maDD+bXhDAQ/SZUYTKd/CQ6YIU1c0EF+e0urU62LNMv6XEFQKz226McdddyVhYZA== +react-native-flipper@0.182.0: + version "0.182.0" + resolved "https://registry.yarnpkg.com/react-native-flipper/-/react-native-flipper-0.182.0.tgz#7a2a5569715a9e571019e84ee2de4f72f4c5a4db" + integrity sha512-AoLVduVWluY99XDPznn05sXRyrE1OeEkc4aQCxDKgQYfCdf82aNOH+hwGO/CKcGEiC3T9oBzeOofqwo+Og4eWA== react-native-gesture-handler@^2.5.0: version "2.15.0"