Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan98Kuch committed Jul 31, 2024
1 parent 697947e commit 55d95bf
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/pageObject.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down

0 comments on commit 55d95bf

Please sign in to comment.