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';
|
2019-01-10 01:25:43 +00:00
|
|
|
this.downloadCountSelect = '#expire-after-dl-count-select';
|
2019-10-15 13:29:48 +00:00
|
|
|
this.addPassword = '#add-password';
|
|
|
|
this.passwordInput = '#password-input';
|
|
|
|
this.passwordButton = '#password-btn';
|
2018-10-02 20:15:02 +00:00
|
|
|
}
|
|
|
|
|
2018-10-31 18:31:17 +00:00
|
|
|
waitForPageToLoad() {
|
2018-11-20 14:50:59 +00:00
|
|
|
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;
|