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