From 55d95bfc3fe6c864a10eebc81d87da0134e78838 Mon Sep 17 00:00:00 2001 From: Bohdan98Kuch Date: Wed, 31 Jul 2024 13:32:01 +0300 Subject: [PATCH] Solution --- src/pageObject.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/pageObject.js b/src/pageObject.js index 52ecb384..67e4866d 100644 --- a/src/pageObject.js +++ b/src/pageObject.js @@ -1,15 +1,36 @@ 'use strict'; class Header { - + constructor() { + this.logo = '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; + this.commentButton = '[Publish comment] button'; + } + + clickOnCommentButton() { + return `Click on the ${this.commentButton}`; + } + assertPageOpened() { + return `The ${this.url} is opened`; + } }; module.exports = {