From ec5d6152279be58f3378b517cbc78f1dbc1a4f8b Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 1 Feb 2023 15:50:02 +0200 Subject: [PATCH] updated readme, fixed test --- readme.md | 3 +-- src/pageObject.test.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 3a478c7f..9f819279 100644 --- a/readme.md +++ b/readme.md @@ -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` diff --git a/src/pageObject.test.js b/src/pageObject.test.js index f3e4a7be..315b338c 100644 --- a/src/pageObject.test.js +++ b/src/pageObject.test.js @@ -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', () => {