Page MenuHomePhabricator

[subtask] Rewrite Page Previews browser tests in Node.js
Closed, ResolvedPublic3 Estimated Story Points

Description

While working on T160238, I propose we split into groups for maximum effectiveness.
This task deals with the Popups extension.

There are 2 scenarios to convert. The popups_settings.feature is unimplemented and should be removed.

Feature: Previews

  • Scenario: Dwelling on a valid link shows a preview # tests/browser/features/previews.feature:8
  • Scenario: Abandoning the link hides the preview # tests/browser/features/previews.feature:12

Notes

  1. Add the mw-wdio-nodepool experimental builder to the Popups item in integration-config/zuul/layout.yaml, which will make check experimental run the new WebdriverIO-based tests.
  1. Put your new tests in the tests/selenium/, following the example structure in RelatedArticles.

Acceptance criteria

  • Remove the settings tests which do not run (see T177310 for more details)
  • Rewrite browser tests for the 2 extensions in a new selenium folder
  • When tests are passing, switch to new job

See T179546.

Sign off notes

The setup of the daily builds will come afterwards (see T171847). Create a task to do this for the extension (or if you are tech lead make that happen).

See also comments on https://gerrit.wikimedia.org/r/#/c/384041

Related Objects

StatusSubtypeAssignedTask
ResolvedJdlrobson
DeclinedNone
Resolvedzeljkofilipin
DuplicateJdlrobson
DeclinedNone
ResolvedJdlrobson
ResolvedNone
Resolvedawight
DuplicateLegoktm
Resolvedhashar
Resolvedzeljkofilipin
Resolvedhashar
OpenNone
ResolvedPRODUCTION ERRORJdlrobson
ResolvedJdlrobson
ResolvedJdrewniak
DeclinedNone
OpenNone
ResolvedNone
Resolvedzeljkofilipin
ResolvedEdtadros
DeclinedNone
ResolvedJdlrobson
Resolvedzeljkofilipin
Resolvedzeljkofilipin
ResolvedJdlrobson
Resolvedzeljkofilipin
Resolvedzeljkofilipin

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson set the point value for this task to 3.Oct 3 2017, 4:35 PM

@phuedx with respect to https://phabricator.wikimedia.org/T177262#3653199 I suggest we go ahead and remove these (https://gerrit.wikimedia.org/r/#/c/381899/) to keep scope low for this and I've opened T177310 to decide what to do with them long term.

Moving back to upcoming, to clear the blocked column for in-flight work, as we haven't started work on this yet.

Change 381899 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Delete unimplemented browser tests

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

Change 383934 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Popups@master] Drop beta feature step testing in browser tests

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

^ Some prep work which will make this even more trivial.

Change 375384 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Popups@master] Port Popups browser tests to selenium

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

Over to you, @Jdlrobson! There's 1 test that's failing and I think it's due to a missing delay.

Change 375384 had a related patch set uploaded (by Zfilipin; owner: Jdlrobson):
[mediawiki/extensions/Popups@master] Port Popups browser tests to selenium

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

Tests are passing in experimental build for https://integration.wikimedia.org/ci/job/mediawiki-core-qunit-selenium-jessie/8496/console but code is not mergeable until the necessary config changes are needed.

Change 383934 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Drop beta feature step testing in browser tests

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

Change 384961 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] Created mediawiki-core-qunit-selenium-jessie template

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

Change 384965 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] Running mediawiki-core-qunit-selenium-jessie for Popups

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

Change 384968 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] Run mediawiki-core-qunit-selenium-jessie for Popups

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

I have created three patches, 384961, 384965 and 384968. Each of them is solving the problem in slightly different way. For each patch integration-zuul-layoutdiff has scared me, since the diff is big. I am not sure what am I doing wrong. I need @hashar's help.

Change 384961 merged by jenkins-bot:
[integration/config@master] Created mediawiki-core-qunit-selenium-jessie template

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

Change 384968 abandoned by Zfilipin:
WIP Run mediawiki-core-qunit-selenium-jessie for Popups

Reason:
better implementation: https://gerrit.wikimedia.org/r/#/c/384965

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

Change 385172 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] WIP Running mediawiki-core-qunit-selenium-jessie for Popups

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

Change 385172 abandoned by Zfilipin:
WIP Running mediawiki-core-qunit-selenium-jessie for Popups

Reason:
better implementation in https://gerrit.wikimedia.org/r/#/c/384965/

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

For those not following along too closely (read: me), what're the changes for @zeljkofilipin?

Change 384965 merged by jenkins-bot:
[integration/config@master] Running mediawiki-core-qunit-selenium-jessie for Popups

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

@phuedx I am not sure I have understood the question. If you are asking what is the status: I had some trouble enabling nodejs+selenium jobs for popups, but it should be working now. :)

I've rebased https://gerrit.wikimedia.org/r/#/c/375384/
I'm guessing that should pass now without check experimental so if that's true all that's needed is a plus two.
When that's done https://gerrit.wikimedia.org/r/#/c/384030/ can be merged which will setup a daily job against the beta cluster.

We are without browser test coverage (per commit) right now.

375384 fails with:

Timeout of 20000ms exceeded. Try to reduce the run time or increase your timeout for test specs (http://webdriver.io/guide/testrunner/timeouts.html); if returning a Promise, ensure it resolves.

384030 was related to T177924 and it was declined.

The browser test passes locally.. I'm not sure why the timeout happens when run there.

Hm, tests are working fine on my machine too.

~/Documents/gerrit/mediawiki/vagrant/mediawiki$ ./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/Popups/tests/selenium/specs/*.js
------------------------------------------------------------------
[chrome #0-0] Session ID: dfca0bbb02b49b6d2bb91901a6ae8850
[chrome #0-0] Spec: /Users/z/Documents/gerrit/mediawiki/vagrant/mediawiki/extensions/Popups/tests/selenium/specs/previews.js
[chrome #0-0] Running: chrome
[chrome #0-0]
[chrome #0-0]   Dwelling on a valid link
[chrome #0-0]
[chrome #0-0]   Dwelling on a valid link
[chrome #0-0]       ✓ I should see a preview
[chrome #0-0]       ✓ Abandoning link hides preview
[chrome #0-0]
[chrome #0-0]
[chrome #0-0] 2 passing (21s)
[chrome #0-0]

Should be passing now. I gave it a different node to focus which seems to have done the trick.
Can https://gerrit.wikimedia.org/r/#/c/375384/ be merged now..?

Change 375384 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Port Popups browser tests to selenium

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

phuedx updated the task description. (Show Details)

It looks like all of the AC are met 🎉🎉🎉

To be clear: T179546: Popups Selenium tests daily _targeting beta cluster covers switching the daily build to the new job.

Change 399168 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/extensions/Popups@master] Fix location of LocalSettings.php

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

Change 399168 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Fix location of LocalSettings.php

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

Change 399822 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/extensions/Popups@master] Clean up ESLint configuration

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

Change 399822 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Clean up ESLint configuration

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

  NODES
Note 11
Project 5
USERS 1