-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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] Extract duplicate e2e test setup to jest config #27334
Conversation
Size Change: 0 B Total Size: 1.19 MB ℹ️ View Unchanged
|
I merged in latest from |
Thanks @cameronvoell! They failed again so I restarted and now they seem to pass. |
@cameronvoell got another merge from master and updated the newly added file block tests. Can you please approve if it looks good. |
import serverConfigs from './serverConfigs'; | ||
import { iosServer, iosLocal, android } from './caps'; | ||
import AppiumLocal from './appium-local'; | ||
const serverConfigs = require( './serverConfigs' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why you converted all the import
methods to require
methods in this file and in packages/react-native-editor/__device-tests__/pages/editor-page.js
. Maybe there's a performance gain for importing some of these dynamically at runtime? Feels like maybe theres a reason I'm missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question! These files are now running in a different jest environment than before, and it's currently not possible to apply the same babel transforms/presets we do to the tests themselves. A PR merged to jest resolves this issue and will hopefully be released in the next versions. jestjs/jest#8751
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests passing locally, and changes look good. I left one question, but otherwise this looks like a much neater setup, and removing the iOS platformVersion requirement is helpful as well. 👍
Description
Gutenberg Mobile PR: wordpress-mobile/gutenberg-mobile#2846
setupFilesAfterEnv
andtestEnvironment
.platformVersion
version from iOS local tests to pick up any available simulator version without hardcoding.How has this been tested?
npm run native test:e2e:ios:local
andnpm run native test:e2e:android:local
should work as before.Screenshots
Types of changes
Checklist: