updated integration tests for new ui

This commit is contained in:
Danny Coates 2018-10-31 11:31:17 -07:00
parent 891ffc20af
commit 6ba3be8a0f
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
11 changed files with 65 additions and 153 deletions

View file

@ -1,23 +1,26 @@
/* global browser document */
const Page = require('./page');
class HomePage extends Page {
constructor() {
super();
this.legalSectionLinks = '.legalSection .legalSection__link';
this.readyToSendLocator = 'div#page-one button.btn';
this.socialLinksLocator = '.socialSection__link';
super('/');
this.footerLinks = 'footer a';
this.uploadInput = '#file-upload';
this.uploadButton = '#upload-btn';
this.progress = 'progress';
this.shareUrl = '#share-url';
}
get legalLinks() {
return this.legalSectionLinks;
waitForPageToLoad() {
browser.waitForExist(this.uploadInput);
this.showUploadInput();
return this;
}
get readyToSend() {
return this.readyToSendLocator;
}
get socialLinks() {
return this.socialLinksLocator;
showUploadInput() {
browser.execute(() => {
document.getElementById('file-upload').style.display = 'block';
});
}
}
module.exports = HomePage;