Skip to content

Commit

Permalink
updated readme, fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav committed Feb 1, 2023
1 parent b6f85f1 commit ec5d615
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ Let's implement 3 classes with inheritance.

## PageObject

- constructor takes `url`
- constructor takes `url` and and assign it to `url` property
- constructor contains `header` property which is an instance of `Header` class
- should contain `clickOnLogo` method. The method should return a string 'Click on the' + `logo` from the `Header` class

## ArticlePage

- should extend `PageObject` class
- constructor taskes `url` and `slug`. Constructor should modify original `url` by adding `slug` at the end
- should contain getter property `commentButton` which return '[Publish comment] button' string
- should contain `clickOnCommentButton` method. The method should return a string 'Click on the' + `commentButton`
Expand Down
2 changes: 1 addition & 1 deletion src/pageObject.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('ArticlePage class', () => {
const page = new ArticlePage('http://test.com', '/test');

expect(page.clickOnCommentButton())
.toBe(`Click on ${page.commentButton}`);
.toBe(`Click on the ${page.commentButton}`);
});

it('should contain a "assertPageOpened" method', () => {
Expand Down

0 comments on commit ec5d615

Please sign in to comment.