Repository navigation
Conversation
tiri39
requested review from
onnee04 and
taohidkhan22
and removed request for
onnee04 and
taohidkhan22
November 18, 2026 05:54
tiri39
force-pushed
the
e2e/C2491-quick-search
branch
from
November 23, 2026 08:54
f65a341 to
d4493fb
Compare
Contributor
There was a problem hiding this comment.
Review of PR #6: Automate C2491 (quick search)
Verdict: request changes. The test design is good: each test creates its own random records, waits through the API until search finds them, checks every result page, and checks the fuzzy edit distances on each run.
Must fix
- Wrong tag (
quick-search-options.spec.ts:496). The "Extra checks" test is not in C2491, but it has the@C2491tag. Create a TestRail case for it, or remove the test. - Spec-only code in
support/.support/is a copy of core. Movequick-search-records.tsnext to the spec. Put the reusable search helpers and thetrackingIdchange indeath-declaration.tsin a PR to core. TheNOTIFYbranch does not returntrackingId.
Should fix
- Setup problems show as search failures.
- The registration number can be missing (
:259-270). Wait for it increateIdRecord(), and remove theif (!registrationNumber) returnbranch. trackingId as string(5 places) hides a missing ID. Throw an error in setup.
- The registration number can be missing (
- 30-second timeout (
:57).CLAUDE.mddoes not permit a longer timeout. Wait for the follow-up request withpage.waitForResponse(). If the slow request is a client bug, report it. - Open the record with
openRecordByTitle()(:193), as core does. - Check the summary page (
:197), for example withgetByTestId('tracking-id-value').
Nits
- Add the helper names to
assertFunctionNamesineslint.config.mjs, and remove the 3eslint-disablecomments. - Link the workbook (
quick-search-records.ts:31), or remove the reference. count(),isVisible()andisDisabled()infindInResultsdo not retry. They can become flaky if the render order changes.- Use
expect(...).toBeVisible()instead ofwaitFor()(:230), andtoHaveURL(predicate)instead ofexpect.poll(:69). - Use a test ID or
getByRole('row')instead of[id^="row_"](:45). - The check for exactly 3 row buttons (
:98) breaks if the row gets a new button. - Use role names, not usernames, in comments.
- The edit-distance code is a lot to maintain. Fixed name pairs would be simpler.
copy corCopy core's support files
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.
Automates C2491. The test searches by tracking ID, name, registration number, NID, phone and email, with valid and invalid values.
tests/search/functionality/quick-search-options.spec.ts: the test (@C2491)support/search/quick-search-records.ts: creates the test recordssupport/test-data/death-declaration.ts: now also returnstrackingIdWhy it works in every release
The test creates its own records at the start of each run, with random names and values. It does not use or change existing data, so records from earlier runs or releases cannot affect it. It also checks every page of the search results.
Fuzzy search
The name search checks the TestRail rule at each limit:
The names are random, but the test makes the "wrong" versions from them and checks the number of changes on every run.
Update: 5 tests with soft checks
@C2491). Each test creates only its own records.Update: file upload fix
The API helpers failed with "File does not belong to this record". The server now accepts a file only when the file is stored under the record (opencrvs-core #14473).
The changes in
support/test-data/are copied frompackages/testland/e2e/support/test-data/in opencrvs-core:uploadFile()inutils.tsnow takes the event ID. It sendspath: events/<eventId>/with the upload.api-actions.ts,birth-declaration.tsanddeath-declaration.tsnow pass the event ID.Other change:
quick-search-records.tsmoved fromsupport/search/totests/search/, because only the quick search tests use it.All specs import the changed helpers, so the CI check runs the full suite.