File tree Expand file tree Collapse file tree 4 files changed +30
-7
lines changed
portal/review-and-submit-page Expand file tree Collapse file tree 4 files changed +30
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ export class ParcelsSection {
3232 }
3333 await expect ( this . isFarmText ( parcelNumber ) ) . toHaveText ( parcel . isFarm ? 'Yes' : 'No' ) ;
3434 await expect ( this . civicAddressText ( parcelNumber ) ) . toHaveText ( parcel . civicAddress ) ;
35- await expect ( this . certificateOfTitleText ( parcelNumber ) ) . toHaveText ( this . fileName ( parcel . certificateOfTitlePath ) ) ;
35+
36+ // Check each child element for certificate of title (mobile/desktop links)
37+ for ( const text of await this . certificateOfTitleText ( parcelNumber ) . locator ( "> *" ) . all ( ) ) {
38+ await expect ( text ) . toHaveText ( this . fileName ( parcel . certificateOfTitlePath ) ) ;
39+ }
3640 }
3741
3842 async expectParcelOwners ( parcelNumber : number , owners : ParcelOwnerDetails [ ] ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ export class TURProposalSection {
88 readonly stepsToReduceImpactText : Locator ;
99 readonly alternativeLandText : Locator ;
1010 readonly totalAreaText : Locator ;
11- readonly allOwnersNotifiedText : Locator ;
1211 readonly proofOfServingNoticeText : Locator ;
1312 readonly proposalMapText : Locator ;
1413
@@ -29,8 +28,15 @@ export class TURProposalSection {
2928 await expect ( this . stepsToReduceImpactText ) . toHaveText ( proposal . stepsToReduceImpact ) ;
3029 await expect ( this . alternativeLandText ) . toHaveText ( proposal . alternativeLand ) ;
3130 await expect ( this . totalAreaText ) . toHaveText ( `${ proposal . totalArea } ha` ) ;
32- await expect ( this . proofOfServingNoticeText ) . toHaveText ( this . fileName ( proposal . proofOfServingNoticePath ) ) ;
33- await expect ( this . proposalMapText ) . toHaveText ( this . fileName ( proposal . proposalMapPath ) ) ;
31+
32+ // ALCS has multiple files with *ngFor, so check each child element
33+ for ( const text of await this . proofOfServingNoticeText . locator ( "> *" ) . all ( ) ) {
34+ await expect ( text ) . toHaveText ( this . fileName ( proposal . proofOfServingNoticePath ) ) ;
35+ }
36+
37+ for ( const text of await this . proposalMapText . locator ( "> *" ) . all ( ) ) {
38+ await expect ( text ) . toHaveText ( this . fileName ( proposal . proposalMapPath ) ) ;
39+ }
3440 }
3541
3642 fileName ( path : string ) : string {
Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ export class ParcelsSection {
3232 }
3333 await expect ( this . isFarmText ( parcelNumber ) ) . toHaveText ( parcel . isFarm ? 'Yes' : 'No' ) ;
3434 await expect ( this . civicAddressText ( parcelNumber ) ) . toHaveText ( parcel . civicAddress ) ;
35- await expect ( this . certificateOfTitleText ( parcelNumber ) ) . toHaveText ( this . fileName ( parcel . certificateOfTitlePath ) ) ;
35+
36+ // Check each child element for certificate of title (mobile/desktop links)
37+ for ( const text of await this . certificateOfTitleText ( parcelNumber ) . locator ( "> *" ) . all ( ) ) {
38+ await expect ( text ) . toHaveText ( this . fileName ( parcel . certificateOfTitlePath ) ) ;
39+ }
40+
3641 await expect ( this . confirmationText ( parcelNumber ) ) . toHaveText ( parcel . isConfirmed ? 'Yes' : 'No' ) ;
3742 }
3843
Original file line number Diff line number Diff line change @@ -31,8 +31,16 @@ export class TURProposalSection {
3131 await expect ( this . alternativeLandText ) . toHaveText ( proposal . alternativeLand ) ;
3232 await expect ( this . totalAreaText ) . toHaveText ( `${ proposal . totalArea } ha` ) ;
3333 await expect ( this . allOwnersNotifiedText ) . toHaveText ( proposal . isConfirmed ? 'Yes' : 'No' ) ;
34- await expect ( this . proofOfServingNoticeText ) . toHaveText ( this . fileName ( proposal . proofOfServingNoticePath ) ) ;
35- await expect ( this . proposalMapText ) . toHaveText ( this . fileName ( proposal . proposalMapPath ) ) ;
34+
35+ // Check each child element for proof of serving notice
36+ for ( const text of await this . proofOfServingNoticeText . locator ( "> *" ) . all ( ) ) {
37+ await expect ( text ) . toHaveText ( this . fileName ( proposal . proofOfServingNoticePath ) ) ;
38+ }
39+
40+ // Check each child element for proposal map
41+ for ( const text of await this . proposalMapText . locator ( "> *" ) . all ( ) ) {
42+ await expect ( text ) . toHaveText ( this . fileName ( proposal . proposalMapPath ) ) ;
43+ }
3644 }
3745
3846 fileName ( path : string ) : string {
You can’t perform that action at this time.
0 commit comments