Commit graph

12 commits

Author SHA1 Message Date
jenkins-bot 85d00ea85f Merge "Adapt Popups browser tests to recent breaking change" 2019-02-02 01:04:43 +00:00
jdlrobson a8b9dc6c07 Adapt Popups browser tests to recent breaking change
The previous Popups test page pointed to the "Main page" which as
of Ie15487184a7f9fc08603fc42cfad3aeac6642dcc has specially handling

This makes a new test page "Popups test page 2" that is linked to from
"Popups test page" which previously linked to the Main page which
now leads to the display of a broken Popup

This gets our test fixed but the problem with main page previews
will remain (T215080)

Bug: T214974
Change-Id: If855c7c0a2ad65d96d03d6a1411b453ecbe8752b
2019-02-01 15:56:18 -08:00
WMDE-Fisch 645aa24b7c Add browser tests for reference previews
The test setup was slightly refactored to be more general about
the type of the popup.

The additional reference links on the test page were added mostly
to be prepared for further tests of more complex cases.

On the CI the tests should be executed with having reference
popups enabled. The code tries to skip test when the feature is
disabled.

See I17687c62cc8d738a4eb41738c9ce6662a5ec68d8
and I1eb7409aa3bd111c2e461dfe245d95f7e78d416c

Bug: T213415
Change-Id: I74110c6227596ff10c75f5f0b0da3d952f11a239
2019-01-24 12:42:49 +00:00
Željko Filipin c578de27d8 Selenium: add selenium-daily NPM script
The script is needed to run the new Docker-based Jenkins job that runs daily and targets beta cluster.
selenium-test script and NPM packages are dependencies. selenium-daily now just calls selenium-test.

selenium-daily might seem redundant, but it provides flexibility. In case a
repository does not want to run all tests daily, that's easily fixed by updating the
selenium-daily script.

Bug: T188742
Change-Id: I35c93ff1897afc4b9e66703a1acf765e3fe7b643
2018-09-05 19:16:12 +00:00
Stephen Niedzielski 4dd9df12eb Doc: update some of the popups / preview terminology
Bug: T165036
Change-Id: Id75543d4d886e4cca8278baaf4f4a21c8e4389b7
2018-03-23 11:18:26 +01:00
Stephen Niedzielski 007cc5ab7c Hygiene: favor string templates over concatenation
Update the ESLint config to favor ES6 strings where variables or string
concatenation is used and fix *all* offenders automatically via:

  eslint \
    --cache \
    --max-warnings 0 \
    --report-unused-disable-directives \
    --fix \
    src tests

Change-Id: I1a9345162348e5ded21d541e7a2ce251ea72ab5a
2018-03-21 08:05:55 -05:00
Stephen Niedzielski 57762e0417 Hygiene: favor const
Bug: T165036
Change-Id: I17d374eaac6627ca6a8ba178862b2a9cff2538c0
2018-03-21 10:44:24 +00:00
Stephen Niedzielski 0bee0906d4 Hygiene: replace var with let and const
eslint \
    --cache \
    --max-warnings 0 \
    --report-unused-disable-directives \
    --fix \
    src tests

Change-Id: I051275126ae7fa9affd16c2504017c0584f2d9c7
2018-03-20 14:14:02 -05:00
Stephen Niedzielski ece4670710 Hygiene: use arrow for anonymous functions
In some places, the arrow function seems more natural. This patch
approximates the following with manual amendments:

  find \
    -not \( \( -name node_modules -o -name .git -o -name vendor -o -name doc -o -name resources \) -prune \) \
    -iname \*.js|
  xargs -rd\\n sed -ri 's%function\s*(\([^)]*\))%\1 =>%g'

Files to focus on were identified with:

  rg -slg\!/resources/dist/ -g\!/i18n/ -g\!/doc/ 'this|self|arguments|bind|call|apply|new'|
  xargs -rd\\n git difftool -y

Bug: T165036
Change-Id: Ic66b6000b8fc000f9bfde39749f9cfa69924a13c
2018-03-20 09:27:08 -05:00
jdlrobson 695a7b6b58 QA: Cleanup unnecessary test changes
Various tweaks were made in Ibe212721807d3698dc45ef46b2dbde15ca9d2f70
to get the browser tests to pass. Many of them were unnecessary.

Change-Id: I47ac37512da38a33f4b3b919cc412b79231b0324
2018-03-16 09:53:04 -07:00
jdlrobson deaaf0961b Remove popups from critical rendering path
Instead load it via mw.loader.using

We retain the module name ext.popups as this will be present
in cached HTML, however now it will load the bulk of the code
inside ext.popups.main

Bug: T176211
Change-Id: Ibe212721807d3698dc45ef46b2dbde15ca9d2f70
2018-03-13 08:44:31 -07:00
jdlrobson cf774be88b Port Popups browser tests to selenium
Bug: T177262
Change-Id: Ie77cf7bc79f454904983ed5cf65dc9fe2b1ececc
2017-11-01 13:31:36 -07:00