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

28 lines
621 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';
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;