Page MenuHomePhabricator

QuickSurveys on Beta messes with TwoColConflict selenium dailys
Closed, ResolvedPublic3 Estimated Story Points

Description

The QuickSurveys extension randomly adds surveys to the content on pages on the Beta-Cluster-Infrastructure. The Two-Column-Edit-Conflict-Merge selenium daily tests check the content of resolved conflicts and the random HTML that gets added by QuickSurveys messes with that.[1]

It would be good to have a way to disable these surveys for the user on a selenium test run.

[1] https://integration.wikimedia.org/ci/job/selenium-daily-beta-TwoColConflict
[2] https://integration.wikimedia.org/ci/job/selenium-daily-beta-TwoColConflict/209/artifact/log/TwoColConflict-save-and-preview-should-resolve-the-conflict-successfully.png

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

Can the test be updated? We enabled a new survey on the beta cluster yesterday as part of T248421. Not totally sure how to workaround this. How do we disable Central Notice banners when they run? What is the test trying to do?

tl;dr: I guess I can just set mw.config.set( 'wgEnabledQuickSurveys', [] ) in the selenium browser tests. I'll try that.

The tests create edit conflicts and resolve them making sure the result is correctly merged. To do that we check the content of .mw-parser-output. QuickSurveys seems to add their stuff there as well. That's why the tests fail.

I could think of some workarounds to only checking a certain part of that output or wrapping our test texts in an additional HTML element with a specific attribute. It feels a bit more convenient to have a way to disable QuickSurveys for the tests though. I'll try with the JS mentioned above.

Change 593480 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/TwoColConflict@master] Disable QuickSurveys when tests run

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

Change 593480 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Disable QuickSurveys when tests run

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

WMDE-Fisch set the point value for this task to 3.
WMDE-Fisch moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2020-04-29 board.

Change 594119 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/TwoColConflict@master] Enable do not track for browser tests

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

Change 594119 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Enable do not track for browser tests

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

We fixed the issues with QuickSurveys by enabling DNT in the Two-Column-Edit-Conflict-Merge browser tests. The dailys do not fail because of the surveys anymore (but for other things). See https://integration.wikimedia.org/ci/job/selenium-daily-beta-TwoColConflict/225/

WMDE-Fisch closed this task as Resolved.May 12 2020, 11:50 AM
WMDE-Fisch moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-04-29 board.
awight added a subscriber: awight.Jun 10 2020, 10:44 AM

Now that we're ignoring DNT, we should find another workaround for the tests. I like the idea of clearing the survey configuration. We could also remove the div before extracting text.