Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a part of migration gutenberg-mobile to gutenberg repo.
In this PR I fixed local native e2e tests.
I moved
jest_ui.config
to thetest/native
directory.The tricky part of that is the
process.env.MOBILE
is set to true inBuild Phases
->Bundle React Native Code And Images
becausereact-native/scripts/react-native-xcode.sh
always takes babel config from the root - help appreciated with that. I solved it by addingMOBILE
env to the Build Phases and if it is set i use the config frompackages/react-native-editor
@gziolo left a comment here #18159 (comment)
As far as I understand from here https://babeljs.io/docs/en/config-files#apicache :
the
api.cache(true)
is an equivalent ofapi.cache.forever()
which means the babel will cache the computed config and never call the function again. So it shouldn't be an issue in that case.The next thing added here is
rn-cli.config.js
at the root level which only requires config frompackages/react-native-editor
. I couldn't make it works w/o this. I tried to set thern-cli.config.js
path as a parameter toreact-native/scripts/react-native-xcode.sh
w/o addingrn-cli.config.js
at the root level.export BUNDLE_CONFIG=packages/react-native-editor/rn-cli.config.js
Not sure why but in that case I get the error:
Seems like the
sass-transformer
doesn't work correctly.If you have any idea how to handle those things in a more elegant way please left a comment :)
NOTE: Files from above are only needed for iOS because android works w/o them.
How has this been tested?
npm run native test:e2e:ios:local
should start iOS e2e tests and they should passnpm run native test:e2e:android:local
should start android e2e tests and they should passTypes of changes
Fix native e2e tests
Checklist: