drop.chapril.org-firefoxsend/test/integration/pages/desktop/home_page.js

27 lines
590 B
JavaScript
Raw Normal View History

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';
2018-10-02 22:15:02 +02:00
}
2018-10-31 19:31:17 +01:00
waitForPageToLoad() {
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;