send/test/integration/pages/desktop/progress_page.js

30 lines
757 B
JavaScript
Raw Normal View History

2018-10-02 20:15:02 +00:00
import Page from './page';
import SharePage from './share_page';
export default class ProgressPage extends Page {
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);
let el = browser.element(this.progressIconLocator);
return browser.elementIdDisplayed(el.value.ELEMENT);
});
let sharePage = new SharePage();
return sharePage.waitForPageToLoad();
}
get cancelBtn() {
return this.cancelBtnLocator;
}
}