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

[RNMobile] Fixes for e2e tests (Gutenberg demo build cache + error logging in setup) #29589

Merged
merged 6 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: sudo xcode-select --switch /Applications/Xcode_12.app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe also try to switch to the latest Xcode/simulator if appium allows it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point, we could try to update it and see if it also works. If you don't mind, I'd like to do it in a separate PR because this PR is blocking another one that blocks a second one 😄 .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to test if it works with Xcode version 12.2 (commented here).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked with Xcode version 12.2 (comment).

@ceyhun I'm going to merge this PR to unblock the other referenced PRs but we could test with the latest Xcode version 12.4 supported by MacOS machines in a new branch/PR.


- name: Build (if needed)
run: test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/gutenberg || npm run native test:e2e:build-app:ios
run: test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || npm run native test:e2e:build-app:ios

- name: Run iOS Device Tests
run: TEST_RN_PLATFORM=ios npm run native device-tests:local ${{ matrix.native-test-name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const ios = {

exports.iosLocal = {
...ios,
waitForQuiescence: true,
fluiddot marked this conversation as resolved.
Show resolved Hide resolved
deviceName: 'iPhone 11',
};

Expand Down
9 changes: 7 additions & 2 deletions packages/react-native-editor/jest_ui_test_environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ const JSDOMEnvironment = require( 'jest-environment-jsdom' );

class CustomEnvironment extends JSDOMEnvironment {
async setup() {
await super.setup();
this.global.editorPage = await initializeEditorPage();
try {
await super.setup();
this.global.editorPage = await initializeEditorPage();
} catch ( error ) {
// eslint-disable-next-line no-console
console.error( 'E2E setup exception:', error );
}
}

async teardown() {
Expand Down