mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 14:40:55 +03:00
updated integration tests for new ui
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
const Page = require('./page');
|
||||
|
||||
class DownloadPage extends Page {
|
||||
constructor() {
|
||||
super();
|
||||
this.downloadBtnLocator = '.btn--download';
|
||||
this.downloadCompletedLocator = '.btn--complete';
|
||||
constructor(path) {
|
||||
super(path);
|
||||
this.downloadButton = '#download-btn';
|
||||
this.downloadComplete = '#download-complete';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -14,21 +14,12 @@ class DownloadPage extends Page {
|
||||
* @throws ElementNotFound
|
||||
*/
|
||||
waitForPageToLoad() {
|
||||
browser.waitUntil(() => {
|
||||
browser.waitForExist(this.downloadBtnLocator);
|
||||
const el = browser.element(this.downloadBtnLocator);
|
||||
return browser.elementIdDisplayed(el.value.ELEMENT);
|
||||
});
|
||||
browser.waitForExist(this.downloadButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
downloadBtn() {
|
||||
this.waitForPageToLoad();
|
||||
return browser.click(this.downloadBtnLocator);
|
||||
}
|
||||
|
||||
get downloadComplete() {
|
||||
return this.downloadCompletedLocator;
|
||||
download() {
|
||||
return browser.click(this.downloadButton);
|
||||
}
|
||||
}
|
||||
module.exports = DownloadPage;
|
||||
|
||||
Reference in New Issue
Block a user