Repository navigation
e2e : birth form page 2 - #5
Open
taohidkhan22 wants to merge 6 commits into
Open
taohidkhan22 wants to merge 6 commits into
taohidkhan22 wants to merge 6 commits into
Conversation
tiri39
reviewed
Nov 27, 2026
| await openChildDetailsPage(page) | ||
| }) | ||
|
|
||
| await test.step('3.1 Select each value of the dropdown', async () => { |
Contributor
There was a problem hiding this comment.
C2666 is updated for the new × button on dropdowns. Please recheck the dropdown steps (3, 6, 7, 8, 9) against it.
tiri39
reviewed
Nov 27, 2026
| await changeOnReview(page, 'child.dob') | ||
| }) | ||
|
|
||
| await test.step('5.2 Enter a date of birth before the delayed registration period', async () => { |
Contributor
There was a problem hiding this comment.
step titles for 5.1 and 5.2 seem confusing as any date before one year of birth falls in the delayed reg period.
should be replaced with something simpler like -
5.1: "Enter a date of birth less than 1 year ago"
5.2: "Enter a date of birth more than 1 year ago"
tiri39
requested changes
Nov 27, 2026
| const field = page.locator(fieldId) | ||
| await field.click() | ||
| await field.getByText(option, { exact: true }).click() | ||
| await expect(field).toContainText(option) |
Contributor
There was a problem hiding this comment.
selectDropdownOption (L141). toContainText(option) can pass while the menu is still open, because the open list contains every option's text. Suggesting checking that the menu closed and the field shows the selected value:
- await expect(field).toContainText(option)
+ await expect(page.locator('.react-select__menu')).toBeHidden()
+ await expect(field.locator('.react-select__single-value')).toHaveText(option)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Playwright coverage for TestRail C2666 – Validate Child's details page in the birth declaration form (page 2). It also fixes the shared auth and upload URLs, because all tests failed against the current environments without that fix.
Changes
1. New spec:
tests/birth-death-forms/birth-form/validate-child-details-page.spec.tsThere is one Playwright test per TestRail step, tagged
@C2666. Eachtest.stepname uses the TestRail sub-step number, so a failure in the report points straight to a TestRail step._error, 32-character limit (truncation), Required error on review2. Fix: auth and API URLs (
support/constants.ts)The environments no longer have the
gateway.subdomain, so login returned 404 for every test. The URLs now match opencrvs-coredevelop:AUTH_URLhttps://gateway.<domain>/authhttps://login.<domain>/api/authGATEWAY_HOSThttps://gateway.<domain>https://register.<domain>/api3. Fix: upload URL (
support/test-data/utils.ts)new URL('/upload', GATEWAY_HOST)dropped the/apipath, so uploads returned 405. It is now`${GATEWAY_HOST}/upload`.TestRail updates
C2666 was changed to match the current UI:
').