Page MenuHomePhabricator

Selenium test "add image.mobile: user can close the image suggestion UI" is flaky
Open, Needs TriagePublic

Description

Failure on https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php74-docker/30554/console
The failure was for a patch set of the Translate extension, the test definition is in GrowthExperiments extension.

» /tests/selenium/specs/addimage.js
add image
   ✓ desktop: user can view image info and image details
   ✖ mobile: user can close the image suggestion UI

1 passing (1m 16.6s)
1 failing

1) add image mobile: user can close the image suggestion UI
Timeout of 60000ms exceeded. The execution in the test "add image mobile: user can close the image suggestion UI" took too long. Try to reduce the run time or increase your timeout for test specs (https://webdriver.io/docs/timeouts). (/workspace/src/extensions/GrowthExperiments/tests/selenium/specs/addimage.js)
Error: Timeout of 60000ms exceeded. The execution in the test "add image mobile: user can close the image suggestion UI" took too long. Try to reduce the run time or increase your timeout for test specs (https://webdriver.io/docs/timeouts). (/workspace/src/extensions/GrowthExperiments/tests/selenium/specs/addimage.js)
    at createTimeoutError (/workspace/src/extensions/GrowthExperiments/node_modules/mocha/lib/errors.js:498:15)
    at Test.Runnable._timeoutError (/workspace/src/extensions/GrowthExperiments/node_modules/mocha/lib/runnable.js:431:10)
    at Timeout.<anonymous> (/workspace/src/extensions/GrowthExperiments/node_modules/mocha/lib/runnable.js:246:24)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

Video of the timeout
https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php74-docker/30554/artifact/log/add-image-mobile%253A-user-can-close-the-image-suggestion-UI-2023-04-12T19-58-40-751Z.mp4

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kostajh subscribed.

It looks like the content editable surface has changed so browser is blocked from exiting the page. I'm not sure why that only happens sometimes. It seems like a bug in webdriverio.

Change 921608 had a related patch set uploaded (by Kosta Harlan; author: Bartosz Dziewoński):

[mediawiki/extensions/GrowthExperiments@master] Temporarily disable failing tests

https://gerrit.wikimedia.org/r/921608

Change 921608 merged by Bartosz Dziewoński:

[mediawiki/extensions/GrowthExperiments@master] Temporarily disable failing tests

https://gerrit.wikimedia.org/r/921608

The desktop version can fail as well:
https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php74-docker/75476/console

22:34:44 [Chrome 90.0.4430.212 linux #0-0] Running: Chrome (v90.0.4430.212) on linux
22:34:44 [Chrome 90.0.4430.212 linux #0-0] Session ID: 474704fb-e1c1-4f67-8e0c-d14515444010
22:34:44 [Chrome 90.0.4430.212 linux #0-0]
22:34:44 [Chrome 90.0.4430.212 linux #0-0] » /tests/selenium/specs/addimage.js
22:34:44 [Chrome 90.0.4430.212 linux #0-0] add image
22:34:44 [Chrome 90.0.4430.212 linux #0-0]    ✖ desktop: user can view image info and image details
22:34:44 [Chrome 90.0.4430.212 linux #0-0]    - mobile: user can close the image suggestion UI
22:34:44 [Chrome 90.0.4430.212 linux #0-0]
22:34:44 [Chrome 90.0.4430.212 linux #0-0] 1 failing (12s)
22:34:44 [Chrome 90.0.4430.212 linux #0-0] 1 skipped
22:34:44 [Chrome 90.0.4430.212 linux #0-0]
22:34:44 [Chrome 90.0.4430.212 linux #0-0] 1) add image desktop: user can view image info and image details
22:34:44 [Chrome 90.0.4430.212 linux #0-0] element (".oo-ui-messageDialog-message") still not displayed after 5000ms
22:34:44 [Chrome 90.0.4430.212 linux #0-0] Error: element (".oo-ui-messageDialog-message") still not displayed after 5000ms
22:34:44 [Chrome 90.0.4430.212 linux #0-0]     at /workspace/src/extensions/GrowthExperiments/node_modules/webdriverio/build/commands/browser/waitUntil.js:66:23

https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php81-docker/16276/console

21:26:42 [Chrome 90.0.4430.212 linux #0-0] Running: Chrome (v90.0.4430.212) on linux
21:26:42 [Chrome 90.0.4430.212 linux #0-0] Session ID: abc381db-c582-4555-b538-239a0cc52dd7
21:26:42 [Chrome 90.0.4430.212 linux #0-0]
21:26:42 [Chrome 90.0.4430.212 linux #0-0] » /tests/selenium/specs/addimage.js
21:26:42 [Chrome 90.0.4430.212 linux #0-0] add image
21:26:42 [Chrome 90.0.4430.212 linux #0-0]    ✖ desktop: user can view image info and image details
21:26:42 [Chrome 90.0.4430.212 linux #0-0]    - mobile: user can close the image suggestion UI
21:26:42 [Chrome 90.0.4430.212 linux #0-0]
21:26:42 [Chrome 90.0.4430.212 linux #0-0] 1 failing (13.6s)
21:26:42 [Chrome 90.0.4430.212 linux #0-0] 1 skipped
21:26:42 [Chrome 90.0.4430.212 linux #0-0]
21:26:42 [Chrome 90.0.4430.212 linux #0-0] 1) add image desktop: user can view image info and image details
21:26:42 [Chrome 90.0.4430.212 linux #0-0] Evaluation failed: notloggedin
21:26:42 [Chrome 90.0.4430.212 linux #0-0] Evaluation failed: notloggedin
21:26:42 [Chrome 90.0.4430.212 linux #0-0] Error: Evaluation failed: notloggedin
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at ExecutionContext._evaluateInternal (/workspace/src/extensions/GrowthExperiments/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async ExecutionContext.evaluate (/workspace/src/extensions/GrowthExperiments/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async ElementHandle.evaluate (/workspace/src/extensions/GrowthExperiments/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:107:16)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async ElementHandle.$eval (/workspace/src/extensions/GrowthExperiments/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:810:24)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async DevToolsDriver.executeScript (/workspace/src/extensions/GrowthExperiments/node_modules/devtools/build/commands/executeScript.js:39:20)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async Browser.wrappedCommand (/workspace/src/extensions/GrowthExperiments/node_modules/devtools/build/devtoolsdriver.js:102:26)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async Browser.wrapCommandFn (/workspace/src/extensions/GrowthExperiments/node_modules/@wdio/utils/build/shim.js:137:29)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async Browser.wrapCommandFn (/workspace/src/extensions/GrowthExperiments/node_modules/@wdio/utils/build/shim.js:137:29)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async AddImageArticlePage.setup (/workspace/src/extensions/GrowthExperiments/tests/selenium/pageobjects/addimage.article.page.js:50:3)
21:26:42 [Chrome 90.0.4430.212 linux #0-0]     at async Context.<anonymous> (/workspace/src/extensions/GrowthExperiments/tests/selenium/specs/addimage.js:19:3)