-
Notifications
You must be signed in to change notification settings - Fork 17
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
Flaky frontend tests #1161
Comments
Braindump Might have something to do with 381f1cf#diff-ba1169b6c91be2d66b1961f46d2a09a28fd896b90f9dc1cefe791e3d3af68ec0R28 Previously, we weren't making the final Now, with the final API call, it is incorrect for the tests to end immediately. Instead, they should wait for the API call to finish before ending. |
Increasing the test timeout to 10s on a local MBP 16" using |
We were experiencing flaky tests as described in issue #1161. A timeout of 10s works fine on a local MBP 16". However, given that the CI servers are likely much weaker, 2x the timeout to be on the safe side.
* fix(frontend): increase jest timeout to 20s We were experiencing flaky tests as described in issue #1161. A timeout of 10s works fine on a local MBP 16". However, given that the CI servers are likely much weaker, 2x the timeout to be on the safe side. * feat: configure the timeout using an env var This is so that we can configure the timeout based on the test environment. * fix(test): add /settings/announcement-version API mock * fix: add a dummy API mock for /settings/announcement-version * fix: disable announcements for all tests We don't have any tests that test the announcement modal. Hence, disable it for now. A longer-term fix would be to add announcement_version to the initial state of the API mock. * fix: correct the type of isActive * chore: don't run tests on Amplify We only rely on Amplify for deployments, so there isn't a major reason to run tests there. The main reason is to block the deployment if a test fails, but any test failures should've been caught on Travis during development. If a failure does happen during deployment, we can manually redeploy an older release.
Describe the bug
Some of the integration tests fail sporadically with the following error:
Specifically, this was experienced commonly with
src/components/dashboard/tests/integration/protected-email.test.tsx
.To Reproduce
Steps to reproduce the behavior:
npm test
. It should fail every now and then.Expected behaviour
All tests should pass 100% of the time.
Possible solution
jest.setTimeout(SOME_LONG_TIMEOUT)
tosetupTests.ts
?The text was updated successfully, but these errors were encountered: