Skip to content

Commit 5f37761

Browse files
lucaswerkmeistermariushoch
authored andcommitted
Upgrade wdio-mediawiki to v5, use ECMAScript modules
Rewrite all imports and exports to ESM syntax, and also clean up the README a bit since the usage example needs to be updated anyway. Also drop declared compatibility with older webdriverio versions, which I think has basically been a lie already (since wdio-mediawiki isn’t compatible with them). Bug: T406844
1 parent e79d3e6 commit 5f37761

File tree

12 files changed

+4183
-1802
lines changed

12 files changed

+4183
-1802
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ WebdriverIO plugin for testing a Wikibase repo.
33

44
This module contains mostly pageobjects and pagesections to be used in selenium browser tests for Wikibase.
55
Usage example:
6-
the file pageobjects/item.page.js contains the pageobject for the item spec file. In Wikibase/repo/selenium/specs/item.js it will have to be required as follows:
7-
`const ItemPage = require( 'wdio-wikibase/pageobjects/item.page' );`
6+
the file pageobjects/item.page.js contains the pageobject for the item spec file. In `Wikibase/repo/tests/selenium/specs/item.js` it will have to be imported as follows:
7+
```js
8+
import ItemPage from 'wdio-wikibase/pageobjects/item.page.js';
9+
```
810

9-
This enables components from the pageobject to be used in the spec by calling Itempage. e.g.:
10-
`ItemPage.addStatementLink.click();`
11+
This enables components from the pageobject to be used in the spec by calling ItemPage. e.g.:
12+
```js
13+
ItemPage.addStatementLink.click();
14+
```
1115

1216
To update or change the contents of this module, clone it locally and commit the changes. Once a new npm version will be released you can run an npm update on your Wikibase instance, after which your changes should be available to you locally.
1317

index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
'use strict';
2-
3-
module.exports = {
4-
// no exports for now, directly import wdio-wikibase/... instead
5-
};
1+
// no exports for now, directly import wdio-wikibase/... instead

0 commit comments

Comments
 (0)