- Open the forked repo in VSCode.
- Create a new branch: git checkout -b added_article_test
- Run the installation commands
npm ci
&npx playwright install
.
- Add all the edit article tests you have created in the previous homework.
- Create the file
fixturesArticles.ts
under thetests/_fixtures
folder. - Add test scope fixtures to the file:
createArticlePage
- for initializing the CreateArticlePage page.viewArticlePage
- for initializing the ViewArticlePage page.editArticlePage
- for initializing the EditArticlePage page.articleWithoutTags
- for generating random article test data.articleWithOneTag
- for generating random article test data.articleWithTwoTags
- for generating random article test data.
- Merge fixtures from
fixturesArticles.ts
to thefixtures.ts
file. - Add a logger to the input parameters of the
generateNewArticleData.js
and the debug logNew article generated: ${article}
.
- use as an example
generateNewUserData.js
.
- Update all the article tests to use fixtures.
- Re-run all your tests and make sure they pass after the updates.
- Change log level from
error
todebug
in thelogger
fixture. Run the commandnpx playwright test
and observe the logs reported. - Change log level from
debug
toinfo
in thelogger
fixture. Run the commandnpx playwright test
and observe the logs reported. - Change log level from
debug
towarn
in thelogger
fixture. Run the commandnpx playwright test
and observe the logs reported. - Change log level from
warn
toerror
in thelogger
fixture. Run the commandnpx playwright test
and observe the logs reported.
- Add and commit all your updates.
- Push the code to the origin.
- Create PR for your changes.
- Fix all the suggestions from the Code review until PR is approved.