Skip to content

Commit

Permalink
Fix Detox integration
Browse files Browse the repository at this point in the history
  • Loading branch information
gvarandas committed Mar 18, 2024
1 parent d81d89a commit 7773000
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 54 deletions.
4 changes: 2 additions & 2 deletions fixture/.detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
testRunner: {
$0: "jest",
args: {
config: "e2e/config.js",
config: "e2e/jest.config.js",
},
},
apps: {
Expand All @@ -30,7 +30,7 @@ module.exports = {
simulator: {
type: "ios.simulator",
device: {
type: "iPhone 11",
type: "iPhone 14",
},
},
emulator: {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions fixture/e2e/config.js

This file was deleted.

19 changes: 0 additions & 19 deletions fixture/e2e/environment.js

This file was deleted.

13 changes: 13 additions & 0 deletions fixture/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
preset: "react-native",
rootDir: "..",
testMatch: ["<rootDir>/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,
};
Original file line number Diff line number Diff line change
@@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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}`;

Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion fixture/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions fixture/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -788,6 +788,6 @@ SPEC CHECKSUMS:
Yoga: d0003f849d2b5224c072cef6568b540d8bb15cd3
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: a33b896298fa0b0d77bde3376427140fab57162b
PODFILE CHECKSUM: de08e73598d1ff7473faa548bd44f290ef696f2f

COCOAPODS: 1.11.3
2 changes: 1 addition & 1 deletion fixture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions fixture/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7773000

Please sign in to comment.