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

30 lines
761 B
JavaScript
Raw Normal View History

2018-10-31 18:31:17 +00:00
/* global browser document */
2018-10-04 00:39:39 +00:00
const Page = require('./page');
2018-10-02 20:15:02 +00:00
2018-10-04 00:39:39 +00:00
class HomePage extends Page {
2018-10-02 20:15:02 +00:00
constructor() {
2018-10-31 18:31:17 +00:00
super('/');
this.footerLinks = 'footer a';
this.uploadInput = '#file-upload';
this.uploadButton = '#upload-btn';
this.progress = 'progress';
this.shareUrl = '#share-url';
this.downloadCountDropdown = '#expire-after-dl-count-dropdown';
this.expiresAfterText = '.text-xs.text-grey-dark.w-full.mt-2.mb-2';
2018-10-02 20:15:02 +00:00
}
2018-10-31 18:31:17 +00:00
waitForPageToLoad() {
super.waitForPageToLoad();
2018-10-31 18:31:17 +00:00
browser.waitForExist(this.uploadInput);
this.showUploadInput();
return this;
2018-10-02 20:15:02 +00:00
}
2018-10-31 18:31:17 +00:00
showUploadInput() {
browser.execute(() => {
document.getElementById('file-upload').style.display = 'block';
});
2018-10-02 20:15:02 +00:00
}
}
2018-10-04 00:39:39 +00:00
module.exports = HomePage;