drop.chapril.org-firefoxsend/test/integration/pages/desktop/progress_page.js

32 lines
808 B
JavaScript
Raw Normal View History

2018-10-04 02:39:39 +02:00
/* global browser */
const Page = require('./page');
const SharePage = require('./share_page');
2018-10-02 22:15:02 +02:00
2018-10-04 02:39:39 +02:00
class ProgressPage extends Page {
2018-10-02 22:15:02 +02:00
constructor() {
super();
this.cancelBtnLocator = '.uploadCancel';
this.progressIconLocator = '.btn--stripes';
}
/**
* @function waitForPageToLoad
* @returns {Object} An object representing the Share page.
* @throws ElementNotFound
*/
waitForPageToLoad() {
browser.waitUntil(() => {
browser.waitForExist(this.progressIconLocator);
2018-10-04 02:39:39 +02:00
const el = browser.element(this.progressIconLocator);
2018-10-02 22:15:02 +02:00
return browser.elementIdDisplayed(el.value.ELEMENT);
});
2018-10-04 02:39:39 +02:00
const sharePage = new SharePage();
2018-10-02 22:15:02 +02:00
return sharePage.waitForPageToLoad();
}
get cancelBtn() {
return this.cancelBtnLocator;
}
}
2018-10-04 02:39:39 +02:00
module.exports = ProgressPage;