-
Notifications
You must be signed in to change notification settings - Fork 180
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
chore: Browser E2E tests for compass-web sandbox COMPASS-7598 COMPASS-7599 #5439
Conversation
@@ -121,6 +125,10 @@ describe('Atlas Login', function () { | |||
}); | |||
|
|||
after(async function () { | |||
if (TEST_COMPASS_WEB) { |
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.
Unfortunately mocha still calls after() if you this.skip() in before() and that's by design: mochajs/mocha#3120
59719bb
to
5697213
Compare
5697213
to
fe24b19
Compare
packages/compass-e2e-tests/helpers/commands/wait-for-connection-result.ts
Outdated
Show resolved
Hide resolved
try { | ||
if (compassWeb.pid) { | ||
debug(`killing compass-web [${compassWeb.pid}]`); | ||
kill(compassWeb.pid); |
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.
This is tree-kill because for some reason I had trouble killing the compass web webpack process on linux. Works locally on mac, but then would hit the 10 minute evergreen timeout at the end for linux in CI. I used why-is-node-running to see what's going on and it is clearly all of compass-web that's still sitting around.
I also looked at what we have in helpers/compass.ts to kill compass. That didn't seem to help here either.
It seems to be something specific to webpack. Another alternative is to just npm run compile
and then serve up the static files, but the output of dist/ doesn't seem to work for that as is yet.
fc84130
to
855371b
Compare
This reverts commit 855371b.
Extracted from #5355
This only runs the time before first query tests in compass-web / the browser. Future tickets will un-skip more tests.
I was going to add it to CI in a separate PR, but then figured it is better to prove that it works and the change for that is quite small.
There are two new npm run scripts in compass-e2e-tests:
test-web
just mirrorstest
and it will run some e2e tests against the compass-web sandbox. It starts the database using mongodb-runner and it starts compass-web itself. Then closes those at the end.test-web-noserverver
won't start the database or compass-web and won't stop them. It also bails on the first test failure. This is useful during e2e test development for maximum speed where you can start these things once and keep them running.These commands also support the new env var BROWSER_NAME which defaults to "chrome". The other value that's currently supported is "firefox". This picks the browser to use in testing.
And then this PR also adds two new tasks (test-web-sandbox-chrome and test-web-sandbox-firefox) to the ubuntu build variant to run these tests in chrome and firefox. We're only doing the ubuntu variant for now because we don't have any platform differences in compass-web yet.