Merge "selenium: Refactor WebdriverIO tests from sync to async mode"

This commit is contained in:
jenkins-bot 2022-02-04 17:52:51 +00:00 committed by Gerrit Code Review
commit f4824633bd
3 changed files with 597 additions and 574 deletions

1146
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,12 +12,11 @@
"selenium-test": "wdio tests/selenium/wdio.conf.js"
},
"devDependencies": {
"@wdio/cli": "7.4.6",
"@wdio/dot-reporter": "7.4.2",
"@wdio/junit-reporter": "7.4.2",
"@wdio/local-runner": "7.4.6",
"@wdio/mocha-framework": "7.4.6",
"@wdio/sync": "7.4.6",
"@wdio/cli": "7.16.13",
"@wdio/dot-reporter": "7.16.13",
"@wdio/junit-reporter": "7.16.13",
"@wdio/local-runner": "7.16.13",
"@wdio/mocha-framework": "7.16.13",
"eslint-config-wikimedia": "0.21.0",
"grunt": "1.4.1",
"grunt-banana-checker": "0.9.0",
@ -33,7 +32,7 @@
"selenium-webdriver": "3.6.0",
"stringify-object": "3.2.2",
"stylelint-config-wikimedia": "0.11.1",
"wdio-mediawiki": "1.2.0",
"webdriverio": "7.4.6"
"wdio-mediawiki": "2.0.0",
"webdriverio": "7.16.13"
}
}

View file

@ -6,14 +6,14 @@ const LoginPage = require( 'wdio-mediawiki/LoginPage' );
describe( 'Content Editable', function () {
it( 'should load when an url is opened', function () {
LoginPage.loginAdmin();
it( 'should load when an url is opened', async function () {
await LoginPage.loginAdmin();
const name = Util.getTestString();
EditPage.openForEditing( name );
await EditPage.openForEditing( name );
EditPage.notices.waitForDisplayed();
assert( EditPage.notices.isDisplayed() );
await EditPage.notices.waitForDisplayed();
assert( await EditPage.notices.isDisplayed() );
} );