Page MenuHomePhabricator

Error running vue component browser tests locally
Open, Needs TriagePublic


When executing the recommended browser test command (docker-compose -f docker-compose.yml -f docker-compose.browsertests.yml up browsertests) the tests run as expected, but we also get the following error at the end:

browsertests_1    | OK. 3 assertions passed. (2.567s)
browsertests_1    | _________________________________________________
browsertests_1    | 
browsertests_1    | TEST FAILURE: 1 error during execution; 0 assertions failed, 3 passed (2.934s)
browsertests_1    | 
browsertests_1    | 
browsertests_1    | lerna ERR! npm run e2e -- --config nightwatch.config.js --env docker stderr:
browsertests_1    | (node:64) ExperimentalWarning: The dns.promises API is experimental
browsertests_1    | - Connecting to selenium on port 4444...
browsertests_1    | 
browsertests_1    | ℹ Connected to selenium on port 4444 (212ms).
browsertests_1    |  ERROR  Error: Command failed: /app/vue-components/node_modules/nightwatch/bin/nightwatch --config nightwatch.config.js --env docker
browsertests_1    | Error: Command failed: /app/vue-components/node_modules/nightwatch/bin/nightwatch --config nightwatch.config.js --env docker
browsertests_1    |     at makeError (/app/vue-components/node_modules/execa/index.js:174:9)
browsertests_1    |     at Promise.all.then.arr (/app/vue-components/node_modules/execa/index.js:278:16)
browsertests_1    |     at process._tickCallback (internal/process/next_tick.js:68:7)
browsertests_1    | npm ERR! code ELIFECYCLE
browsertests_1    | npm ERR! errno 1
browsertests_1    | npm ERR! @wmde/wikit-vue-components@1.1.2 e2e: `vue-cli-service test:e2e "--config" "nightwatch.config.js" "--env" "docker"`
browsertests_1    | npm ERR! Exit status 1

This may have to do with the node version (node 10 provided by the WMF docker image) we're using.

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptOct 23 2020, 3:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jakob_WMDE updated the task description. (Show Details)Oct 23 2020, 3:55 PM

The error goes away locally when removing the afterEach function in vue-components/tests/e2e/globals.js

It seems that the check if( !this.isLocal ) only happens the first time and it tries to run updateJob in the second run of the test.