mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "selenium: Add EditPage.saveComplete()"
This commit is contained in:
commit
26ffb7fb11
|
@ -4,6 +4,7 @@
|
|||
"wikimedia/selenium"
|
||||
],
|
||||
"globals": {
|
||||
"mw": "readonly"
|
||||
"mw": "readonly",
|
||||
"ve": "readonly"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,5 +25,13 @@ class EditPage extends Page {
|
|||
} );
|
||||
}
|
||||
|
||||
saveComplete() {
|
||||
return browser.executeAsync( function ( done ) {
|
||||
ve.init.target.on( 'save', function () {
|
||||
done();
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
}
|
||||
module.exports = new EditPage();
|
||||
|
|
|
@ -54,7 +54,7 @@ describe( 'Content Editable', function () {
|
|||
await EditPage.savePage.waitForClickable();
|
||||
await EditPage.savePage.click();
|
||||
|
||||
await EditPage.notification.waitForDisplayed();
|
||||
await EditPage.saveComplete();
|
||||
assert.strictEqual( await EditPage.notification.getText(), 'The page has been created.' );
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in a new issue