@@ -23,7 +23,7 @@ import { random } from 'lodash'
2323import { formatV2ChildName } from '../v2-birth/helpers'
2424import { 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