home_page.js 812 B

12345678910111213141516171819202122232425262728293031
  1. /* global browser document */
  2. const Page = require('./page');
  3. class HomePage extends Page {
  4. constructor() {
  5. super('/');
  6. this.footerLinks = 'footer a';
  7. this.uploadInput = '#file-upload';
  8. this.uploadButton = '#upload-btn';
  9. this.progress = 'progress';
  10. this.shareUrl = '#share-url';
  11. this.downloadCountSelect = '#expire-after-dl-count-select';
  12. this.addPassword = '#add-password';
  13. this.passwordInput = '#password-input';
  14. this.passwordButton = '#password-btn';
  15. }
  16. waitForPageToLoad() {
  17. super.waitForPageToLoad();
  18. browser.waitForExist(this.uploadInput);
  19. this.showUploadInput();
  20. return this;
  21. }
  22. showUploadInput() {
  23. browser.execute(() => {
  24. document.getElementById('file-upload').style.display = 'block';
  25. });
  26. }
  27. }
  28. module.exports = HomePage;