Skip to content

Commit

Permalink
added implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
helga16 committed Nov 1, 2024
1 parent 045eacb commit 7db216e
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions src/pageObject.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
'use strict';

class Header {

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

class PageObject {

};
constructor(url, header = new Header()) {
this.header = header;
this.url = url;
}
clickOnLogo() {
return 'Click on the ' + this.header.logo;
}
}

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

0 comments on commit 7db216e

Please sign in to comment.