Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #310

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -21,3 +21,4 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "GPL-3.0",
"devDependencies": {
"@mate-academy/eslint-config": "0.0.25",
"@mate-academy/scripts": "^1.2.8",
"@mate-academy/scripts": "^1.8.1",
"eslint": "^5.16.0",
"eslint-plugin-jest": "^22.4.1",
"eslint-plugin-node": "^8.0.1",
Expand Down
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(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 += 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
Loading