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
test: add End-2-End test suite #4035
Conversation
13cc618
to
7e7edcc
Compare
There is a bug in 5.12.1 that prevent the process to end correctly webdriverio/webdriverio#4368 We can also not update to v5.12.0 because of webdriverio/webdriverio#4356
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.
- looks like storybook is built for e2e, doesn't seem necessary.
- logs contain "RUNNING", which likely isn't useful on CI?
- looks like we're only testing on windows? I guess fine for now
Co-Authored-By: Haroen Viaene <hello@haroen.me>
I used the
It depends, since the tests can be long to run it can be good to see when they started in the logs. Also there is no option to suppress this in WebdriverIO (still displayed even with
No objections to test on multiple platforms but multiplying the browser/platform combinations can seriously lengthen test time so we should choose carefully what to test. Right now one test take ~30sec, and we can run 5 tests in parallel on SauceLabs // x = number of tests
// y = number of browser/platform combinations
// the result is the number of minutes to run the e2e test suite
Math.ceil((x * y) / 5) * 0.5 |
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.
Netlify deployment is not triggered but from the configuration, it should work.
I think that's the best minimal effort that we can do now because we use both macOS and Linux on the team, but not Windows. If it doesn't add too much overhead, we can add other platforms. |
@Haroenv yes, Renovate will update this type of reference. Example: renovate-tests/npm8#2 |
Great! Thank you @rarkins 👍 |
package.json
Outdated
@@ -80,6 +83,13 @@ | |||
"@types/storybook__addon-actions": "^3.4.2", | |||
"@typescript-eslint/eslint-plugin": "1.13.0", | |||
"@typescript-eslint/parser": "1.13.0", | |||
"@wdio/cli": "5.11.14", |
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.
could theses be subdependencies of instantsearch-e2e-tests#v1.1.0 ?
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.
They could be, but I choose to put them as peerDependencies
since the wdio
command will be run from instantsearch.js
. Also it gives us more control having them as top dependencies.
Summary
To improve InstantSearch releases reliability we plan to add some End-2-End tests in addition to our existing unit test suite.
Based on #4030, this PR integrates this test suite to InstantSearch.js.
This PR makes the following changes:
algolia/instantsearch-e2-tests
as devDependency (since I'm not sure we want to publish it on npm I link to the GitHub repository).algolia/instantsearch-e2-tests
peerDependencies..env
file to.gitignore
so you can use it to store Sauce Labs credentials (see https://github.com/algolia/instantsearch-e2e-tests#credentials ).test:e2e
: Alias fortest:e2e:local
.test:e2e:local
: Run the test suite on Chrome browser on your local machine.test:e2e:saucelabs
: Run the test suite on multiple browsers on the Sauce Labs service.test_e2e
task.cp
instead ofrsync
(which is unavailable on CircleCI).