Skip to content

Commit 03c4d00

Browse files
committed
update kitUpload-page
1 parent bc9a5c9 commit 03c4d00

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

playwright-e2e/dsm/pages/kitUpload-page/kitUpload-page.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ export default class KitUploadPage {
2020

2121
public async waitForReady(kitTypes?: KitTypeEnum[]): Promise<void> {
2222
const knownKitTypes = kitTypes ?? this.expectedKitTypes; //Use the param kit types if provided, if they are not, then use the general expected kit types
23-
await this.page.waitForLoadState('networkidle');
23+
await Promise.all([
24+
this.page.waitForLoadState(),
25+
this.assertPageTitle()
26+
]);
27+
await expect(this.skipAddressValidationCheckbox).toBeVisible();
2428
await waitForNoSpinner(this.page);
25-
await this.assertPageTitle();
2629
await this.assertDisplayedKitTypes(knownKitTypes);
2730
}
2831

@@ -142,7 +145,11 @@ export default class KitUploadPage {
142145
}
143146

144147
public async skipAddressValidation(value = false): Promise<void> {
145-
value && await this.page.locator('//mat-checkbox[.//*[@class="mat-checkbox-label" and text()="Skip address validation on upload"]]').click();
148+
value && await this.skipAddressValidationCheckbox.click();
149+
}
150+
151+
public get skipAddressValidationCheckbox(): Locator {
152+
return this.page.locator('//mat-checkbox[.//*[@class="mat-checkbox-label" and text()="Skip address validation on upload"]]');
146153
}
147154

148155
/* XPaths */

0 commit comments

Comments
 (0)