Commit graph

18 commits

Author SHA1 Message Date
jenkins-bot
09121089f4 Merge "auth: Disable irrelevant account creation fields for temp users" 2024-09-10 20:05:43 +00:00
Máté Szabó
d150c66840 auth: Disable irrelevant account creation fields for temp users
Why:

- When signing up for an account, temporary users are currently forced
  to provide a reason for creating an account, and also have the option
  to send a temporary password to an email address.
- Neither of these options are useful for temporary users wanting to
  create a full user account.

What:

- Don't show these two form fields on Special:CreateAccount for temporary users.
- Add a functional test for the temporary user account creation flow.

Bug: T328718
Change-Id: Ie545857f7647be89d9462ec2b0def48690f0a2bf
2024-09-10 16:45:56 +02:00
jenkins-bot
c79c070737 Merge "selenium: Remove engines from wdio-mediawiki" 2024-09-09 14:02:07 +00:00
Željko Filipin
e2341256c7 selenium: Remove engines from wdio-mediawiki
Bug: T373684
Change-Id: I2d482b61d6a3bf037f43c9050b46f989c06bc559
2024-09-09 13:48:09 +02:00
Lucas Werkmeister
10609e6dee wdio-mediawiki: Add random element to junit-reporter file name
Without this, it’s possible (though rare) for two tests to write to the
same file, producing garbled XML. As far as I can tell, there’s no way
to access the test name in the outputFileFormat callback (it gets passed
an options object but the test name doesn’t seem to be included in it),
so just add a random string, using the simplest method that should work
in every JS engine. (I tried using crypto.getRandomValues() first, and
it works without warning in fresh-node18, but ESLint still yelled at me
about the Node.js feature being experimental.)

As far as I can tell from Codesearch [1], the file names are matched by
Jenkins using the glob log/WDIO.xunit*.xml, so the changed file name
pattern should still work there.

[1]: https://codesearch.wmcloud.org/search/?q=WDIO%5C.xunit

Bug: T307914
Change-Id: If51549f1318c601782b3fa4ff34923e5c7db5e62
2024-09-06 13:19:00 +02:00
Kolawole
39d3a0cc09 Add a line after JSDoc block descriptions
Bug: T364193
Change-Id: Ide953babcbfc4b309a59c88b371f5b10369e2b72
2024-05-04 15:45:53 +01:00
Željko Filipin
02b182d180 selenium: Fix and update links in comments and documentation
Bug: T324766
Change-Id: If62835494fe7dd47fc4f18b881783570340cb5a9
2024-02-15 16:12:25 +01:00
Vaughn Walters
541351ca4e selenium: Fix tests on macOS + Node.js v18
Tests work just fine on Linux + Node.js v16 and v18.
Tests work just fine on macOS + Node.js v16.
All tests are broken on macOS + Node.js v18.
This commit fixes tests on macOS + Node.js v18.
The commit should be removed as soon as T324766 is resolved.

Bug: T355556
Change-Id: I54437ba60164a4a89b3aacf05d6b3f3abde254ac
2024-01-23 16:33:26 +01:00
James D. Forrester
c2aa05102d build: Upgrade eslint-config-wikimedia from 0.25.0 to 0.26.0 and make pass
Mostly this has a bunch of whitespace changes from the
template-curly-spacing and brace-style rules being set
to align with other spacing rules.

Change-Id: I4609c52a4ef426ad1f35fb4bfe447bb08323a8e8
2023-11-22 13:25:32 -05:00
Antoine Musso
f31f3a2533 wdio-mediawiki: await saveScreenshot
On a test failure, I noticed it lacked the final screenshot as if the
content of our `afterTest` hook did not run. `browser.saveScreenshot` is
asynchronous and I guess it does not have an opportunity to
run/complete.

From https://github.com/webdriverio/webdriverio/issues/5545 and
specially the following comment:

> @christian-bromann wrote:
> > Aren't the hooks async by default?
>
> Sure, but if you do an async operation in there like saveScreenshot
> you have to define it as async function.

We thus have to await `browser.saveScreenshot` and explicitly define the
hook as being asynchronous so it can be waited for.

Bug: T337463
Change-Id: Icd38fdc48e3d280a901b341e99e394ba52678c84
2023-08-25 07:45:04 +00:00
Željko Filipin
230474254b selenium: Delete automationProtocol setting
Devtools is now the default automation protocol, there is no need to
have it explicitly stated in the configuration file.

Bug: T303737
Change-Id: I32f118d0911db3d8a208c19a944a1404b86e67d1
2022-11-24 16:26:33 +01:00
Zfilipin
b2577213b3 Revert "selenium: Default to larger window size"
This reverts commit 6548e0b934.

Reason for revert: This commit breaks video recording in CI.

Bug: T317879
Bug: T314115
Change-Id: I0fbd9ab9737a5c4f83c2a913aaaa60408f90c514
2022-10-25 12:50:38 +00:00
Kosta Harlan
6548e0b934 selenium: Default to larger window size
Some Selenium tests can fail when the viewport is smaller than
anticipated (e.g. T314114: Selenium: Close help panel before
editing), because an element may be obscured by another one
and so is no longer clickable or visible to Selenium. Let's
start with a larger window size as the default; individual tests
can override this with browser.setWindowSize().

Bug: T314115
Change-Id: I3bf0dcecd5f9e623fcf9fc7f3196e478d3db0551
2022-08-30 12:34:54 +00:00
Željko Filipin
aca6ae6d83 selenium: Use @wdio/spec-reporter
@wdio/dot-reporter that we currently use doesn't display much. For
example, it doesn't display skipped tests. It says 5 test suites are
executed, but that's a lie. 3 of those 5 suites are skipped.

@wdio/spec-reporter is more verbose but it actually outputs useful
information, like which tests are running, which are skipped.

This is a revert of aa7133ce86.

Bug: T280331
Change-Id: I7cef7d6a6d1b5e472622a81afc4f9a91523c1ca9
2022-03-24 15:31:45 +00:00
Kosta Harlan
4ee71ea809 Allow a retry of flaky selenium test
Flaky selenium tests are a problem (https://w.wiki/3XMD).

Ideally we'd have better shared practices around writing tests that
reduce flakiness, but there will probably always be some element of
instability due to the nature of these tests.

We should fix flaky tests where there are clear fixes to do so, but it
would also be nice to not have to re-run a 20 minute build when a 5
second test, when retried, passes.

https://webdriver.io/docs/retry indicates that you can specify a number
of times to retry a spec file, so that's what is added here.

Change-Id: I29a4943e7ddaf755b242756543d9402177a0f6e5
2021-06-22 12:01:22 +00:00
Željko Filipin
eb44ff5e01 selenium: Fix Cannot find module 'dotenv'
dotenv is used only in core. It's usage was introduced into
wdio-defaults.conf.js by mistake in 8a4fab5, while moving functionality
from wdio.conf.js.

This patch moves dotenv usage back to wdio.conf.js, where it should be.

Bug: T283613
Change-Id: I6ec96248cd0b829ef44e574b7e6dc98cf363ee3a
2021-05-25 19:05:10 +02:00
sahil
ca162392cd selenium: Dismiss Chrome's Save password? popup
Bug: T280969
Change-Id: I1d2230dc3ce7cc0f3186b373d467c6e386722e10
2021-05-24 17:56:52 +00:00
Adam Wight
bf08ba4496 Minor cleanups to wdio default config
Renames and documents the config file to make its usage clear.

Bug: T281484
Change-Id: I5cb66265077787657047bbd9106cef595b5e607d
2021-05-21 13:40:42 +02:00
Renamed from tests/selenium/wdio-mediawiki/wdio.conf.js (Browse further)