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