Skip to content

Commit 69a2c4e

Browse files
committed
wip with test improvements
1 parent 96cb5c2 commit 69a2c4e

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

e2e/testcases/v2-birth/declarations/birth-declaration-5.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,7 @@ test.describe.serial('5. Birth declaration case - 5', () => {
511511
await expect(page.getByRole('dialog')).not.toBeVisible()
512512
})
513513

514-
// @TODO: take in to use after workflows are implemented on V2
515-
test.skip('5.1.8 Register', async () => {
514+
test('5.1.8 Register', async () => {
516515
await page.getByRole('button', { name: 'Register' }).click()
517516
await page.locator('#confirm_Declare').click()
518517

e2e/testcases/v2-correction-birth/correct-birth-record-4.spec.ts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { random } from 'lodash'
2323
import { formatV2ChildName } from '../v2-birth/helpers'
2424
import { ensureAssigned } from '../../v2-utils'
2525

26-
test.describe.serial(' Correct record - 4', () => {
26+
test.describe.serial('Correct record - 4', () => {
2727
let declaration: DeclarationV2
2828
let trackingId = ''
2929
let eventId: string
@@ -55,7 +55,9 @@ test.describe.serial(' Correct record - 4', () => {
5555

5656
const updatedChildDetails = {
5757
placeOfBirth: 'Health Institution',
58-
birthFacility: 'Mwenekombe Health Post'
58+
birthFacility: 'Mwenekombe Health Post',
59+
firstNames: faker.person.firstName(),
60+
familyName: faker.person.lastName()
5961
}
6062

6163
const correctionFee = faker.number.int({ min: 1, max: 1000 }).toString()
@@ -194,6 +196,7 @@ test.describe.serial(' Correct record - 4', () => {
194196

195197
await page.getByRole('button', { name: 'Verified' }).click()
196198
})
199+
197200
test('4.4 Upload supporting documents', async () => {
198201
/*
199202
* Expected result: should
@@ -702,6 +705,20 @@ test.describe.serial(' Correct record - 4', () => {
702705
.getByTestId('row-value-child.birthLocation')
703706
.getByText(updatedChildDetails.birthFacility)
704707
).toBeVisible()
708+
})
709+
710+
test('4.4.3 Change child name', async () => {
711+
await page.getByTestId('change-button-child.name').click()
712+
713+
await page
714+
.getByTestId('text__firstname')
715+
.fill(updatedChildDetails.firstNames)
716+
717+
await page
718+
.getByTestId('text__surname')
719+
.fill(updatedChildDetails.familyName)
720+
721+
await goBackToReview(page)
705722
await page.getByRole('button', { name: 'Continue' }).click()
706723
})
707724
})
@@ -878,9 +895,15 @@ test.describe.serial(' Correct record - 4', () => {
878895
test('4.8 Validate history in record audit', async () => {
879896
await auditRecord({
880897
page,
881-
name: formatV2ChildName(declaration),
898+
name: formatV2ChildName({
899+
'child.name': {
900+
firstname: updatedChildDetails.firstNames,
901+
surname: updatedChildDetails.familyName
902+
}
903+
}),
882904
trackingId
883905
})
906+
884907
await ensureAssigned(page)
885908

886909
/*

0 commit comments

Comments
 (0)