These are causing trouble because of the forwards-compatibility
logic. When Cite is present, we transparently switch to using that
code base for reference previews which means these tests are running
against the wrong code. Dropping tests here in favor of the Cite
tests.
Bug: T355194
Change-Id: Ide1940ad1e915eee7127f36fb2a7c87b5fb6f88a
Mainly auto fixes but also getting rid of some straight forward lint
warnings to reduce the wall of issues a bit when running the tests.
Also removing some rule exceptions that seem to got more relaxed
upstream.
Change-Id: Icb4d73374583675be74517e6df6508314d61e8c2
The extension is out of beta and will be enabled by default now.
Leaving some hints if we decide to also remove the feature flag.
Bug: T282999
Bug: T351708
Change-Id: I1556b2f3592294d094770ede2c276eddeef8bbe9
The previous selector in the case of the first reference link
matches two elements - one in the "Reference links" section
and one in the "References" section.
My hunch is this leads to the test failures we have been seeing
Bug: T344072
Change-Id: Icda37b4f46add4049344f7a8c452082d7b0df5c8
I also removed the bool on the shouldUseReferencePopupsBetaFeature
method. It was always just used with `true`
Bug: T293072
Change-Id: I1a2d6f912fcac2ac77539581897e0feab489edf0
Includes a bit untangling of the reference and page previews tests
and simplifies the setup.
Bug: T337862
Change-Id: Ia92cccb90fd79d10c5b33744520cb963a65db046
As part of T310054, we moved article tabs into
the #content area on the beta cluster which caused
the daily tests to fail. As a result the page previews
test is currently expecting a page preview to show
on hovering "Article" which is not the case.
Update selector to target links in the parser
content
Bug: T310313
Change-Id: I0bbccbbfbae458d5c32eaea12f855b832b52491c
I was not able to reproduce the issue locally, but I believe
this might be the reason for the failure we see. It can't hurt
and needs to change anyway, with or without the failure.
Bug: T281324
Change-Id: I0002f952438d7afe2fb6c2100bf25760f7dda10d
JUnit reporter configuration changed since WebdriverIO v6. Before this
patch, the reporter was outputing to terminal, instead of outputing to
file.
Bug: T214686
Change-Id: Ib315b0261b3724cded17c85519ac28842d7ab071
The tests were skipped for some time already because the beta
feature mode is taken into account on the test systems. The tests
need to login and enable the beta feature mode to be executed. This
is fixed with that patch.
The patch also fixes broken tests due to changes that made one test
obsolete and another that needed adjustments.
There are also comments added to places where code can be removed or
altered if the feature gets out of beta status.
Bug: T268134
Change-Id: Ib96d23f3cb6c6130fd5880a78fafd252bf706475
We no longer intercept reference clicks, now clicking on a reference
label will scroll to the reference definition in the same way as when
reference previews is disabled.
Metrics about clicking on the label are collected by the Cite
extension, are are unaffected by this change.
Bug: T265482
Change-Id: I2929a86b6a09f3b72e5e2f4151cb13f52446897d
Update NPM packages: webdriverio, wdio-mediawiki.
Replace NPM packages:
- wdio-mocha-framework with @wdio/mocha-framework.
- wdio-spec-reporter with @wdio/spec-reporter.
- wdio-junit-reporter with @wdio/junit-reporter.
New NPM packages: @wdio/cli, @wdio/local-runner, @wdio/sync.
Commands that return data no longer wrapped in `{ value: … }`.
Values are now returned directly.
Replace:
- `browser.element` with `$`.
- `chromeOptions` with `'goog:chromeOptions'`.
- `password` with `mwPwd`.
- `username` with `mwUser`.
- `moveToObject()` with `moveTo()`.
- `isVisible()` with `isDisplayed()`.
Bug: T258620
Change-Id: If339ff08b5e87c91905a65927ccd7e1b72b9f8e4
Notice how this actually reduces the size of the final, compiled index.js.
It's not much, but still.
One issue I noticed is that the coverage reports for the JS code stopped
working. I have no idea why.
Bug: T208951
Change-Id: I2fe92579574b3b1ba4d2dd064899eee944045a96
I just realized on another test set, that this is actually not implemented
in a way where it is working correctly. The return value of the browser.exectue()
is returned as part of an object and not directly. So the condition was always
true and the wait until did not really wait for anything.
As a result I'm quite confident the pause is not necessary.
Change-Id: I274bdee0b3c39c418a2b61881d56f89889c53485
The test would lead to an exception when 'mediaWiki' is not defined. The
exception would then also abort the whole execution so in this context it's
safer to use typeof with 'undefined'.
When the mediaWiki js base is loaded though, loader.getState() is guaranteed
to be available since it is part of the root module.
This also uses "mw" instead of "mediaWiki" for consistency in test.
Change-Id: I1262d0b5c4a1136f4d2294f125336e72118c6e2c
- test page loading and waiting for the scripts moved to beforeEach
- removed unnecessary abondonLink call
- removed unnecessary browser.pause()
Change-Id: I28eb7b9b48f105315bf41f7a41e5a1e6ec21cb2b
For the reference preview tests we extended that with a lot of stuff
that we do not really use in the tests atm. Lets only have stuff in there
that's really relevant for the tests.
Change-Id: I03c6e00445e9bfe48572fd1b19a7ef1ecd472f4e
- Drop unused moment, Redux, and ReduxThunk globals.
- Instead of using a confusing and deprecated boolean, specify that
globals are "readable" / "writable"
https://eslint.org/docs/user-guide/configuring#specifying-globals
Change-Id: I711a4ea7c51c9a560f20fc28bc99bd932c7e1e25
This patch also removes misplaced empty lines at the beginning of a
scope. In PHP code we even have a sniff for these. In JavaScript we
don't, but I suggest to be consistent about this.
Change-Id: Ic104ae8fe176da1dafa9bc783402adecb71de1f0
A lead section is essential for a summary in the /restbase/
content service. On commits we test the mediawiki endpoint but
against beta cluster we test the restbase endpoint.
I overlooked this in If855c7c0a2ad65d96d03d6a1411b453ecbe8752b
Bug: T214974
Change-Id: I9959d7ae463c4e1d4fa5345fdb59fe1b2152d49e
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
Mocha discourages the usage of arrow functiones in the test specs since
Mocha context can't be accessed from inside.
I stumbled across this when using this.skip(); in the reference preview
selenium tests. Since it took me some time to figure out why it was not
working, I guess it's better to avoid lambdas generally there.
See https://mochajs.org/#arrow-functions
Change-Id: I95cb183ac88e9a624c449a8f9addbe84bf76c335
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
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
$wgUsejQueryThree was a transient setting that has been removed with
MediaWiki 1.31. It is thus no more needed in the Selenium
LocalSettings.php file.
Bug: T199939
Change-Id: I74565cc81ff3704d2d91c8768b0e8f8ee7a4dcc3