Page MenuHomePhabricator

Move to WDIO v8 for tests
Closed, ResolvedPublic

Description

Move WDIO version to above 8

  • Currently requires a compatible wdio-wikibase version.
  • needs ESM imports
  • All test cases should still run

Note: no official upgrade guide on the webpage.

Event Timeline

RickiJay-WMDE changed the task status from Open to In Progress.Sep 22 2023, 7:58 AM

Should we estimate this or may I?

IMPLEMENTATION NOTES

  • browser.config is replaced by browser.options, which largely does not allow for the use of custom fields. Environment variables are used where necessary.
  • wdio.conf.js moved to test directory
  • Patched wdio-mediawiki code:
    • test/helpers/WDIOMediawikiPagePatch.js patched wdio-mediawiki/Page
    • test/helpers/WDIOMediawikiScreenshotPatch.js patched screenshot-related functions in wdio-mediawiki/index.js

CORRECTIONS

  • ES Module imports not needed for 8; vice versa.
  • Was able to patch wdio-wikibase/WikibaseApi. See test/helpers/WikibaseApiPatch.js.

FOLOS NEEDED

  • Update wdio-mediawiki to v8, including the code correction specified above
  • Update wdio-wikibase to v8, including the code correction specified above
  • Move code to Typescript, which probably would have clued me into the options field errors a day earlier