-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
@delianides, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jbaxleyiii, @JakeDawkins and @richarddubay to be potential reviewers. |
Generated by 🚫 dangerJS |
FYI these tests will probably fail on CI for right now. |
Updated Snapshots
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.
I got these tests to run locally. Also updated the snapshots. But the smoke tests fail on CI. I guess we'd need some work to make that happen.
e2e/firstTest.spec.js
Outdated
|
||
describe("Rock Native End-to-End", () => { | ||
beforeEach(async () => { | ||
await device.reloadReactNative(); |
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.
dang all of these globals suck
e2e/firstTest.spec.js
Outdated
}); | ||
|
||
it('should tap increment', async () => { | ||
await element(by.id('increment')).multiTap(2); |
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 is awesome
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.
@delianides since jest won't work currently, can you setup npm scripts for running these tests? Add the needed dev deps like detox?
We should be able to tell jest to ignore these files until that PR for support is done.
Any idea what CI support looks like?
@jbaxleyiii ...and tell jest to ignore the |
@delianides yep! |
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
=======================================
Coverage 99.44% 99.44%
=======================================
Files 32 32
Lines 179 179
Branches 17 17
=======================================
Hits 178 178
Misses 1 1
Continue to review full report at Codecov.
|
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.
The tests have been moved to /src/__tests__/e2e
. I changed the yarn e2e
comment to run detox build && detox test
and configured jest to ignore all e2e
matching files/folders
A very basic PR for running detox with rock-native. Right now detox really doesn't like being run with anything less than 7.6 but we could push it through babel to get async/await support. I was able to get jest to connect with detox but was having issues with exports.
detox.init
is supposed to include the expectation library but since jest has its own which is also exported underexpect
it doesn't seem to work.You can get this working with mocha by following these steps:
nvm use/install 7.6
fbsimctl
,brew tap facebook/fb
export CODE_SIGNING_REQUIRED=NO && brew install fbsimctl --HEAD
npm i
to get mocha and detoxnpm install -g detox-cli
yarn start
yarn server
detox build && detox test
I didn't have any issues running the project on 7.6.
Notes: