Page MenuHomePhabricator

Move one Selenium tests from mediawiki/core to mediawiki/skins/Vector
Closed, ResolvedPublic

Description

Status

Blocked on understanding the problem. See T187859#4054069 for details.

Description

Move Selenium test from 404080 from mediawiki/core to mediawiki/skins/Vector. The test is causing problems for other extensions and skins. See T185928 for more information.

The original commit (413157) caused problems for mediawiki/skins/MinervaNeue. See T188553 for more information. @Jdlrobson has reverted it (415393) until CI is fixed. The original commit is restored (but not merged) in 415614. See topic:T187859 for all commits.

Event Timeline

zeljkofilipin renamed this task from Selenium tests for Vector skin to Move one Selenium tests from mediawiki/core to mediawiki/skins/Vector.Feb 21 2018, 10:12 AM
zeljkofilipin updated the task description. (Show Details)
zeljkofilipin updated the task description. (Show Details)

Change 413157 had a related patch set uploaded (by Zfilipin; owner: Addshore):
[mediawiki/skins/Vector@master] WIP Move one Selenium tests from mediawiki/core

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

Change 413157 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Move Selenium test from mediawiki/core

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

This could help:

useskin=Vector
useskin=Minerva

Change 415614 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/Vector@master] WIP: Move Selenium test from mediawiki/core

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

useskin=Vector
useskin=Minerva

I don't follow... the Minerva skin should not be installing Vector in order to run its browser tests, so Vector should not exist and its browser tests should not be running.

I don't follow... the Minerva skin should not be installing Vector in order to run its browser tests, so Vector should not exist and its browser tests should not be running.

Sorry, I was talking with @hashar how to fix T188553 and I was leaving notes for myself. I have explained in T188553#4017820 why Vector tests were run for patches in Minerva.

Jenkins

[[ https://integration.wikimedia.org/ci/job/mediawiki-core-qunit-selenium-jessie/ | mediawiki-core-qunit-selenium-jessie ]] Jenkins job runs Selenium tests.

integration/config

The job is defined in [[ https://phabricator.wikimedia.org/source/integration-config/browse/master/jjb/mediawiki.yaml;df49dfb867d22137fb6dcf8fe7c693b51eec8280$8 | mediawiki.yaml ]].

It has mw-wdio-nodepool builder defined in [[ https://phabricator.wikimedia.org/source/integration-config/browse/master/jjb/macro.yaml;df49dfb867d22137fb6dcf8fe7c693b51eec8280$260 | macro.yaml ]].

Selenium job is executed by [[ https://phabricator.wikimedia.org/source/integration-config/browse/master/jjb/macro.yaml;df49dfb867d22137fb6dcf8fe7c693b51eec8280$283 | grunt webdriver:test ]].

mediawiki/core

Tests to run are defined in [[ https://phabricator.wikimedia.org/source/mediawiki/browse/master/tests/selenium/wdio.conf.js;312c32319d701f62d49b1509e68dd43d585f3273$47-52 | wdio.conf.js ]]:

 specs: [
   relPath( './tests/selenium/specs/**/*.js' ),
   relPath( './extensions/*/tests/selenium/specs/**/*.js' ),
   relPath( './extensions/VisualEditor/modules/ve-mw/tests/selenium/specs/**/*.js' ),
   relPath( './skins/*/tests/selenium/specs/**/*.js' )
],

There is some Jenkins-specific configuration in [[ https://phabricator.wikimedia.org/source/mediawiki/browse/master/tests/selenium/wdio.conf.jenkins.js | wdio.conf.jenkins.js ]]. For now it only has username, password and alike. It could potentially be used to override configuration from wdio.conf.js.

Change 419805 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/skins/MinervaNeue@master] WIP Move one Selenium tests from mediawiki/core to mediawiki/skins/Vector

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

@Jdlrobson I would like to reproduce the problem locally (using mediawiki-vagrant) so I could resolve it, but I am not sure how to do that. If I provision minerva role, vector is still the default skin, and vector test passes.

I have created 419805, copy/pasting vector test to minerva repository. It reproduces the problem, but not in a way I was expecting.

The test fails with:

00:03:15.135 An element could not be located on the page using the given search parameters ("div.usermessage").

but when I take a look at the screenshot, it shows vector skin, not minerva.

should-be-able-to-view-new-message-banner.png (899×1 px, 77 KB)

I am confused. Does Minerva change something in Vector skin, causing Vector test to fail?

zeljkofilipin updated the task description. (Show Details)
zeljkofilipin awarded a token.

@Jdlrobson I would like to reproduce the problem locally (using mediawiki-vagrant) so I could resolve it, but I am not sure how to do that. If I provision minerva role, vector is still the default skin, and vector test passes.

Are you including the LocalSettings.php needed for the browser tests?[1]

I have created 419805, copy/pasting vector test to minerva repository. It reproduces the problem, but not in a way I was expecting.

I'm not sure how that patch helps. The issue is that the test is running despite being outside the Minerva repo. The Vector test is incompatible with the Minerva ones (which has tests which expect it to be the default skin) so there is no way to fix the Vector test. Instead we have to find a way to run skin tests exclusively or disable browser test groups via localsettings.

I am confused. Does Minerva change something in Vector skin, causing Vector test to fail?

Yes it does. Minerva needs to be the default skin for CI
[1].

E.g. be tested where Vector skin is not the default. The test fails as the Vector test is running against Minerva.

[1] https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/tests/browser/LocalSettings.php

Change 415614 abandoned by Jdlrobson:
WIP: Move Selenium test from mediawiki/core

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

Change 419805 abandoned by Zfilipin:
WIP Move one Selenium tests from mediawiki/core to mediawiki/skins/Vector

Reason:
no activity in months

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

zeljkofilipin raised the priority of this task from Low to Needs Triage.May 18 2021, 9:55 AM
zeljkofilipin claimed this task.
zeljkofilipin edited projects, added Browser-Tests; removed User-zeljkofilipin.

Core tests now run fine without Vector.