File tree 1 file changed +10
-3
lines changed
playwright-e2e/dsm/pages/kitUpload-page
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,12 @@ export default class KitUploadPage {
20
20
21
21
public async waitForReady ( kitTypes ?: KitTypeEnum [ ] ) : Promise < void > {
22
22
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 ( ) ;
24
28
await waitForNoSpinner ( this . page ) ;
25
- await this . assertPageTitle ( ) ;
26
29
await this . assertDisplayedKitTypes ( knownKitTypes ) ;
27
30
}
28
31
@@ -142,7 +145,11 @@ export default class KitUploadPage {
142
145
}
143
146
144
147
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"]]' ) ;
146
153
}
147
154
148
155
/* XPaths */
You can’t perform that action at this time.
0 commit comments