2018-10-31 19:31:17 +01:00
|
|
|
/* global browser document */
|
2018-10-04 02:39:39 +02:00
|
|
|
const Page = require('./page');
|
2018-10-02 22:15:02 +02:00
|
|
|
|
2018-10-04 02:39:39 +02:00
|
|
|
class HomePage extends Page {
|
2018-10-02 22:15:02 +02:00
|
|
|
constructor() {
|
2018-10-31 19:31:17 +01:00
|
|
|
super('/');
|
|
|
|
this.footerLinks = 'footer a';
|
|
|
|
this.uploadInput = '#file-upload';
|
|
|
|
this.uploadButton = '#upload-btn';
|
|
|
|
this.progress = 'progress';
|
|
|
|
this.shareUrl = '#share-url';
|
2019-01-10 02:25:43 +01:00
|
|
|
this.downloadCountSelect = '#expire-after-dl-count-select';
|
2019-10-15 15:29:48 +02:00
|
|
|
this.addPassword = '#add-password';
|
|
|
|
this.passwordInput = '#password-input';
|
|
|
|
this.passwordButton = '#password-btn';
|
2018-10-02 22:15:02 +02:00
|
|
|
}
|
|
|
|
|
2018-10-31 19:31:17 +01:00
|
|
|
waitForPageToLoad() {
|
2018-11-20 15:50:59 +01:00
|
|
|
super.waitForPageToLoad();
|
2018-10-31 19:31:17 +01:00
|
|
|
browser.waitForExist(this.uploadInput);
|
|
|
|
this.showUploadInput();
|
|
|
|
return this;
|
2018-10-02 22:15:02 +02:00
|
|
|
}
|
|
|
|
|
2018-10-31 19:31:17 +01:00
|
|
|
showUploadInput() {
|
|
|
|
browser.execute(() => {
|
|
|
|
document.getElementById('file-upload').style.display = 'block';
|
|
|
|
});
|
2018-10-02 22:15:02 +02:00
|
|
|
}
|
|
|
|
}
|
2018-10-04 02:39:39 +02:00
|
|
|
module.exports = HomePage;
|