2018-10-04 02:39:39 +02:00
|
|
|
/* global browser */
|
|
|
|
const Page = require('./page');
|
2018-10-02 22:15:02 +02:00
|
|
|
|
2018-10-04 02:39:39 +02:00
|
|
|
class SharePage extends Page {
|
2018-10-02 22:15:02 +02:00
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
this.sharePageLocator = '#shareWrapper';
|
|
|
|
this.shareUrlLocator = '#fileUrl';
|
|
|
|
}
|
|
|
|
|
|
|
|
waitForPageToLoad() {
|
|
|
|
browser.waitUntil(() => {
|
|
|
|
browser.waitForExist(this.sharePageLocator);
|
2018-10-04 02:39:39 +02:00
|
|
|
const el = browser.element(this.sharePageLocator);
|
2018-10-02 22:15:02 +02:00
|
|
|
return browser.elementIdDisplayed(el.value.ELEMENT);
|
|
|
|
});
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
get fileUrl() {
|
|
|
|
return this.shareUrlLocator;
|
|
|
|
}
|
|
|
|
}
|
2018-10-04 02:39:39 +02:00
|
|
|
module.exports = SharePage;
|