Skip to content

Commit

Permalink
pom
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliia-sirom committed Jan 6, 2024
1 parent ec5d615 commit 763f553
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/pageObject.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
'use strict';

class Header {

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

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

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

class ArticlePage extends PageObject {
constructor(urlCons, slugCons) {
super(urlCons);
this.url += slugCons;
}
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 763f553

Please sign in to comment.