Comment on a post and verify the comment count
Easy30 pts~2 min
- Text areas
- Disabled buttons
- Scoped locators
Practice app · ConnectIn
A professional network: a 3-step sign-up wizard, a feed with likes, comments and lazy-loaded posts, a notifications dropdown, a messaging drawer with auto-replies, job search with filters and a multi-step Easy Apply modal, member profiles with connect/withdraw, a skills tag input and company pages that open a careers site in a new tab.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Add a comment to Daniel Okafor's post, then verify the comment is listed under the post, the comment box is cleared and the comment count increased from 14 to 15.
Your task
- 1Open TEST_URL (you are already signed in).
- 2In the post with data-post-id="p2", assert .comment-count reads “14 comments”, then click Comment (.comment-toggle).
- 3Type “Agreed! Our page objects only describe the page now.” into #comment-input-p2 and click Post (.comment-submit).
- 4Assert the new comment appears in that post's comment list (data-mine="true"), #comment-input-p2 is empty and .comment-count reads “15 comments”.
Acceptance criteria
- The comment is listed under Daniel's post.
- The comment count reads 15 comments.
- The comment box is cleared.
- The test makes at least two assertions.
Fixtures
- alex@connectin.test
- Password
- Connect@2026
- Account name
- Alex Morgan
- Password rules
- 8+ characters with an uppercase letter, a number and a special character
- Locations
- Bengaluru, India · Berlin, Germany · London, UK · New York, US · Toronto, Canada
- Featured company
- Northwind Labs (#/company/northwind-labs)
Playwright · Playwright Challenges · ConnectIn