In this task, you will get more practice creating reusable components and using OOP.
You will create components for the Conduit ExternalHomePage
:
and for the InternalHomePage
:
Also for the ExternalViewArticlePage
:
and the InternalViewArticlePage
:
-
Open the forked repo in VSCode.
-
Create a new branch by running
git checkout -b task_solution
. -
Run the installation commands:
npm ci
npx playwright install
- Write new tests for the Conduit site:
- Logged-in user can view own article in the Global Feed section;
- Logged-in user can find own article by Tag from the Popular tags section and view in the Tag' Feed;
- Not logged in user can view the article created by other user in the Global Feed section;
- Not logged in user can open the article page created by other user from the Global Feed section;
- To write these tests work with the components and base pages:
- 2.1
- create component
PopularTags
; - initialize component
PopularTags
in theBaseHomePage
class;
- 2.2
- create component
ArticleListItem
; - initialize the
ArticleFeedItem
in thePopular Feeds
class; - initialize the
ArticleFeedItem
in theGlobal Feeds
class;
- 2.3
- create component
TagFeed
; - initialize
TagFeed
in theExternalHomePage
; - initialize
TagFeed
in theInternalHomePage
;
- 2.4
- create page
BaseViewArticlePage
; - extend
ExternalViewArticlePage
andInternalViewArticlePage
pages from theBaseViewArticlePage
;
- 2.5
- create the
BaseArticleContentBlock
component; - extend the
ArticleContentBlock
andAuthorsArticleContentBlock
from theBaseArticleBody
component - initialize
ArticleContentBlock
component within theBaseViewArticlePage
constructor; - initialize
AuthorArticleContentBlock
component within theInternalViewArticlePage
constructor;
- Run all the tests and make sure they are passing.
- Add and commit all your updates.
- Push the code to the origin.
- Create a PR for your changes.
- Keep implementing suggestions from code review until your PR is approved.