Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Alina-Lemishko committed Mar 20, 2024
1 parent 87367d4 commit 7fb92e0
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/pageObject.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
'use strict';

class Header {

get logo() {
return 'Conduit logo';
}
};

class PageObject {
constructor(url) {
this.url = url;
this.header = new Header();
this.logo = this.header.logo;
}

clickOnLogo() {
return `Click on the ${this.logo}`;
}
};

class ArticlePage extends PageObject {
constructor(url, slug) {
super(url);
this.slug = slug;
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 = {
Expand Down

0 comments on commit 7fb92e0

Please sign in to comment.