diff --git a/src/pageObject.js b/src/pageObject.js index 52ecb384..14cac4c5 100644 --- a/src/pageObject.js +++ b/src/pageObject.js @@ -1,15 +1,39 @@ 'use strict'; class Header { - + get logo() { + return 'Conduit logo'; + }; }; class PageObject { + constructor(url) { + this.url = url; + this.header = new Header(); + }; + clickOnLogo() { + return `Click on the ${this.header.logo}`; + }; }; class ArticlePage extends PageObject { + constructor(url, slug) { + super(url); + this.slug = slug; + }; + + get commentButton() { + return '[Publish comment] button'; + }; + + clickOnCommentButton() { + return `Click on the ${this.commentButton}`; + }; + assertPageOpened() { + return `The ${this.url} is opened`; + }; }; module.exports = {