From da316ddeb7a42b31f2b4d2fafe85fe94d3075899 Mon Sep 17 00:00:00 2001 From: Olesia Semen Date: Sat, 4 Nov 2023 11:48:18 +0200 Subject: [PATCH] Testing --- src/pageObject.js | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) 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,