Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
tperepelytsia committed Oct 18, 2024
1 parent 697947e commit 6946d85
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/pageObject.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
'use strict';

class Header {

get logo() {
return '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 + slug);
this.slug = 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 6946d85

Please sign in to comment.