Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stable iOS e2e tests #392

Merged
merged 57 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3e12564
fix: stable iOS e2e tests
kirillzyusko Mar 19, 2024
002bd04
chore: 120 -> 240 seconds timeout
kirillzyusko Mar 19, 2024
19bac38
feat: try rosetta
kirillzyusko Mar 19, 2024
3a18fb2
fix: try to use iOS 16.4
kirillzyusko Mar 20, 2024
79e023b
fix: try to use patch
kirillzyusko Mar 20, 2024
daa0c84
chore: gather device logs
kirillzyusko Mar 20, 2024
5f27a03
fix: capture device logs only for failing tests
kirillzyusko Mar 26, 2024
d8217c2
chore: try to increase timeout again?
kirillzyusko Mar 26, 2024
71b727f
feat: debug resources
kirillzyusko Mar 26, 2024
91536db
feat: cool down
kirillzyusko Mar 26, 2024
cbe7ec3
feat: free up RAM
kirillzyusko Mar 26, 2024
b90e79c
feat: do checks earlier
kirillzyusko Mar 26, 2024
b9d7fb8
feat: check memory state before/after memory free up
kirillzyusko Mar 26, 2024
089e77f
chore: try to use macos-12
kirillzyusko Mar 27, 2024
55aa13b
fix: don't use rosetta on Intel
kirillzyusko Mar 27, 2024
f558c26
feat: OS 13, XCode 15.2 (still Intel)
kirillzyusko Mar 27, 2024
ec5d0bd
chore: go back to iPhone 15 Pro
kirillzyusko Mar 27, 2024
726680a
chore: grab device logs for android too
kirillzyusko Mar 27, 2024
03a6744
chore: remove metrics gathering
kirillzyusko Mar 27, 2024
d2d70fa
chore: remove patch
kirillzyusko Mar 27, 2024
916fc31
chore: remove iPhone 14 assets
kirillzyusko Mar 27, 2024
58d095a
chore: rollback to 2 mins timeout
kirillzyusko Mar 27, 2024
449bd7a
chore: remove rosetta installation
kirillzyusko Mar 27, 2024
fe81ed9
feat: keep detox cache to speed up a build
kirillzyusko Mar 27, 2024
a233ab1
fix: correct path
kirillzyusko Mar 27, 2024
9c73dba
chore: remove detox cache (since it's actually doesn't cache anything)
kirillzyusko Mar 27, 2024
08ac9ce
chore: increase timeout
kirillzyusko Mar 27, 2024
bf7e5e6
fix: unstable aware scroll view test
kirillzyusko Mar 27, 2024
671b813
fix: waitForExpect -> async-retry
kirillzyusko Mar 27, 2024
6ac21de
chore: reuse, increased timeout
kirillzyusko Mar 27, 2024
6a84440
chore: increase timeout, don't reuse
kirillzyusko Mar 27, 2024
5959be9
chore: try to unschedule layout animations?
kirillzyusko Mar 27, 2024
62046c2
sensitive to date&time
kirillzyusko Mar 27, 2024
b603868
fix: try to scroll instead of swipe
kirillzyusko Mar 27, 2024
c659d09
fix: uncomment code
kirillzyusko Mar 27, 2024
ccd94c0
feat: comment out code again
kirillzyusko Mar 27, 2024
a59a21b
fix: bigger percentage for keyboard toolbar closed
kirillzyusko Mar 28, 2024
bd6c3a1
fix: unschedule animation after finish
kirillzyusko Mar 28, 2024
d0002d0
fix: increase tolerance
kirillzyusko Mar 28, 2024
d74d08f
fix: okay, macos-13 still flaky (simulators laggy, we are also gettin…
kirillzyusko Mar 28, 2024
4af0181
fix: switch back to macos-13
kirillzyusko Mar 28, 2024
7bbe287
fix: use macos-14, XCode 15.3
kirillzyusko Mar 29, 2024
2ae30ec
fix: run in sequence
kirillzyusko Mar 30, 2024
482b78f
fix: update assets
kirillzyusko Mar 30, 2024
1a9a96f
fix: bigger timeouts, better readability
kirillzyusko Mar 31, 2024
87a3d25
feat: revert iOS specific changes
kirillzyusko Mar 31, 2024
33715d8
chore: use default acceptable diff for ToolbarKeyboardClosed
kirillzyusko Mar 31, 2024
2dc28d3
feat: global setup & teardown
kirillzyusko Mar 31, 2024
e264713
feat: remove code duplication
kirillzyusko Mar 31, 2024
e077693
feat: retries, decreased timeout
kirillzyusko Mar 31, 2024
9e35e3f
chore: remove device logs capturing
kirillzyusko Mar 31, 2024
94962d7
feat: try yeetd to speed up a test process
kirillzyusko Apr 1, 2024
e86c36f
feat: try old timeouts
kirillzyusko Apr 1, 2024
5bdfe64
revert: yeetd remove
kirillzyusko Apr 1, 2024
fe8d4bc
chore: try to pre boot simulator to speed up a process
kirillzyusko Apr 2, 2024
3d3c7b4
chore: don't use stable order
kirillzyusko Apr 2, 2024
793cfb5
chore: reverts before merge
kirillzyusko Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ios-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
test:
name: ⚙️ Automated test cases
runs-on: macos-14
timeout-minutes: 60
timeout-minutes: 90
env:
WORKING_DIRECTORY: example
concurrency:
Expand Down
6 changes: 0 additions & 6 deletions e2e/kit/001-keyboard-animation.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ import {
waitForElementById,
waitForExpect,
} from "./helpers";
import setDemoMode from "./utils/setDemoMode";

describe("Example", () => {
beforeAll(async () => {
await setDemoMode();
await device.launchApp();
});

it("should navigate to `Animated transition` screen", async () => {
await waitAndTap("animated_transition");
await waitForElementById("keyboard_animation_text_input");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@ import {
waitForElementById,
waitForExpect,
} from "./helpers";
import setDemoMode from "./utils/setDemoMode";

describe("Example", () => {
beforeAll(async () => {
await setDemoMode();
await device.launchApp();
});

it("should navigate to `Enabled/disabled` screen", async () => {
await scrollDownUntilElementIsVisible(
"main_scroll_view",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ import {
waitAndType,
waitForElementById,
} from "./helpers";
import setDemoMode from "./utils/setDemoMode";

describe("`onTextChange` functionality", () => {
beforeAll(async () => {
await setDemoMode();
await device.launchApp();
});

it("should fire `onTextChange` with correct text", async () => {
await scrollDownUntilElementIsVisible(
"main_scroll_view",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
waitAndType,
waitForExpect,
} from "./helpers";
import setDemoMode from "./utils/setDemoMode";

const BLINKING_CURSOR = 0.35;

Expand All @@ -17,11 +16,6 @@ const closeKeyboard = async () => {
};

describe("AwareScrollView test cases", () => {
beforeAll(async () => {
await setDemoMode();
await device.launchApp();
});

it("should push input above keyboard on focus", async () => {
await waitAndTap("aware_scroll_view");
await waitAndTap("TextInput#3");
Expand Down Expand Up @@ -55,7 +49,7 @@ describe("AwareScrollView test cases", () => {
});

it("should auto-scroll when user types a text", async () => {
await element(by.id("TextInput#4")).swipe("down", "slow", 0.15);
await element(by.id("aware_scroll_view_container")).scroll(80, "up");
await typeText("TextInput#4", "1");
await waitForExpect(async () => {
await expectBitmapsToBeEqual(
Expand Down
6 changes: 0 additions & 6 deletions e2e/kit/005-keyboard-toolbar.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ import {
waitForElementById,
waitForExpect,
} from "./helpers";
import setDemoMode from "./utils/setDemoMode";

describe("`KeyboardToolbar` specification", () => {
beforeAll(async () => {
await setDemoMode();
await device.launchApp();
});

it("should navigate to `Toolbar` screen", async () => {
await scrollDownUntilElementIsVisible("main_scroll_view", "toolbar");
await waitAndTap("toolbar");
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.
1 change: 1 addition & 0 deletions e2e/kit/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ module.exports = {
globalTeardown: "detox/runners/jest/globalTeardown",
reporters: ["detox/runners/jest/reporter"],
testEnvironment: "detox/runners/jest/testEnvironment",
setupFilesAfterEnv: ["<rootDir>/setup-jest.ts"],
verbose: true,
};
10 changes: 10 additions & 0 deletions e2e/kit/setup-jest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import setDemoMode from "./utils/setDemoMode";

beforeAll(async () => {
await setDemoMode();
await device.launchApp();
});

afterAll(async () => {
await device.terminateApp();
});
10 changes: 6 additions & 4 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"main": "index.js",
"scripts": {
"build-example:android": "detox build --configuration example.android.emu.release",
"test-example:android": "detox test --configuration example.android.emu.release --loglevel verbose --take-screenshots failing --record-videos failing",
"test-example:android": "detox test --configuration example.android.emu.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
"build-example:ios": "detox build --configuration example.ios.sim.release",
"test-example:ios": "detox test --configuration example.ios.sim.release --loglevel verbose --take-screenshots failing --record-videos failing",
"test-example:ios": "detox test --configuration example.ios.sim.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
"test": "echo \"Error: no test specified\" && exit 1",
"detox-clean": "detox clean-framework-cache && detox build-framework-cache"
"detox-clean": "detox clean-framework-cache && detox build-framework-cache",
"postinstall": "patch-package"
},
"repository": {
"type": "git",
Expand All @@ -30,8 +31,9 @@
"@types/pngjs": "^6.0.1",
"async-retry": "^1.3.3",
"colors": "^1.4.0",
"detox": "^20.19.0",
"detox": "^20.19.3",
"jest": "^29",
"patch-package": "^8.0.0",
"pixelmatch": "^5.3.0",
"pngjs": "^7.0.0",
"ts-jest": "^29.1.1"
Expand Down
Loading
Loading