Page MenuHomePhabricator

"Page should be undoable" selenium test is flaky
Open, Needs TriagePublic

Description

Seen this fail twice today, out of maybe a dozen merge attempts:

13:20:56 [0-1] Error in "Page should be undoable"
13:20:56 Can't call getText on element with selector "#mw-content-text .mw-parser-output" because element wasn't found
13:20:56 [0-1] FAILED in chrome - /tests/selenium/specs/page.js

The screenshot suggests this is a timing issue, checking the page content before the page finished saving:

Page-should-be-undoable.png (1,020×1,361 px, 154 KB)

The test was added in rMW32c36f0e7303: selenium: undo page which was quite a while ago, not sure what changed.

Event Timeline

It seems to me that for some reason welcome to testwiki popup wasn't disabled, and that caused the failure.

Daimona raised the priority of this task from Medium to Unbreak Now!.Mar 8 2021, 4:46 PM
Daimona subscribed.

This has caused r669091 for AbuseFilter to fail gate-and-submit twice today.

Breaking other repos -> UBN

I'm unlikely to have the time to take a look today, de-assigning for now.

Change 670173 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Suppress VisualEditor welcome dialog in undo Selenium test

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

Change 670173 merged by jenkins-bot:
[mediawiki/core@master] Suppress VisualEditor welcome dialog in undo Selenium test

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

matmarex subscribed.

Hopefully fixed?

This time the error is:

23:14:18 Node is either not visible or not an HTMLElement

image.png (1,005×1,361 px, 167 KB)

Change 670787 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/core@master] selenium: Disable flaky undoable page test

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

Another error screenshot:

image.png (1,005×828 px, 94 KB)

This keeps breaking in GrowthExperiments repo patches, I'm not sure if it's seen elsewhere. I've pushed a patch to disable the test.

Change 670787 merged by jenkins-bot:
[mediawiki/core@master] selenium: Disable flaky undoable page test

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

Jdforrester-WMF lowered the priority of this task from Unbreak Now! to High.Mar 25 2021, 10:06 PM
Jdforrester-WMF subscribed.

Test is disabled, so no longer UBN.

zeljkofilipin raised the priority of this task from High to Needs Triage.Sep 17 2021, 9:35 AM

Change #1246920 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] selenium: Wait for the browser to navigate away

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

Change #1247024 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] selenium: Make sure our change is in the list (not first)

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

Looking at the stats there hasn't been a flake issue since the 14 of Feb so not sure if this is an issue anymore

Screenshot 2026-03-06 at 08.34.39.png (3,200×128 px, 52 KB)

Seen on VisualEditor some days ago
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/1247583
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php83-selenium/25900/console

16:30:09 [0-0] Error in "Page.should be undoable"
16:30:09 Error: Expect  to have text
16:30:09 
16:30:09 Expected: StringContaining "beforeEach-content-0.8235105885007201-Iñtërnâtiônàlizætiøn"
16:30:09 Received: "editContent-0.526408608742597-Iñtërnâtiônàlizætiøn"
16:30:09     at Context.<anonymous> (file:///workspace/src/tests/selenium/specs/page.js:101:45)
16:30:09 [0-0] RETRYING in chrome - file:///tests/selenium/specs/page.js
16:30:11 [0-0] RUNNING in chrome - file:///tests/selenium/specs/page.js
16:30:12 [0-0] [Browser information] chrome-headless-shell 120.0.6099.224 viewPort 1280x1024
16:30:53 [0-0] Error in "Page.should be undoable"
16:30:53 Error: Expect  to have text
16:30:53 
16:30:53 Expected: StringContaining "beforeEach-content-0.7375455557873987-Iñtërnâtiônàlizætiøn"
16:30:53 Received: "editContent-0.5917848481715517-Iñtërnâtiônàlizætiøn"
16:30:53     at Context.<anonymous> (file:///workspace/src/tests/selenium/specs/page.js:101:45)
16:30:53 [0-0] FAILED in chrome - file:///tests/selenium/specs/page.js (1 retries)

Change #1246920 abandoned by Phedenskog:

[mediawiki/core@master] selenium: Wait for the browser to navigate away

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