mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
selenium: Add EditPage.saveComplete()
Add new check for page saving. Bug: T296187 Change-Id: I07639c58377f6f285df1bfeccfb5e037a3e619d5
This commit is contained in:
parent
bffaab97fb
commit
3e93410e68
|
@ -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