diff --git a/src/pageObject.js b/src/pageObject.js index 52ecb384..70d1cf28 100644 --- a/src/pageObject.js +++ b/src/pageObject.js @@ -1,15 +1,35 @@ '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.url += slug; + } + get commentButton() { + return '[Publish comment] button'; + } + clickOnCommentButton() { + return `Click on the ${this.commentButton}`; + } + assertPageOpened() { + return `The ${this.url} is opened`; + } }; module.exports = {