@@ -17,23 +17,16 @@ class ScreenshotAreaPage extends BasePageObject {
17
17
}
18
18
}
19
19
20
- test ( 'shows warning message when the page height exceeds the limit and hides when it does not' , async ( ) => {
21
- try {
22
- await useBrowser ( async browser => {
23
- const page = new ScreenshotAreaPage ( browser ) ;
24
- await browser . url ( '#light/utils/screenshot-area-warning' ) ;
25
- await page . waitForVisible ( '.screenshot-area' ) ;
26
- await expect ( page . isWarningDisplayed ( ) ) . resolves . toBe ( false ) ;
27
- await page . clickAddItems ( ) ;
28
- await expect ( page . isWarningDisplayed ( ) ) . resolves . toBe ( true ) ;
29
- await page . clickRemoveItems ( ) ;
30
- await expect ( page . isWarningDisplayed ( ) ) . resolves . toBe ( false ) ;
31
- } ) ( ) ;
32
- } catch ( error : any ) {
33
- if ( error . message . includes ( 'Unexpected errors in browser console' ) ) {
34
- // The console errors are expected in this test
35
- } else {
36
- throw error ;
37
- }
38
- }
39
- } ) ;
20
+ test (
21
+ 'shows warning message when the page height exceeds the limit and hides when it does not' ,
22
+ useBrowser ( async browser => {
23
+ const page = new ScreenshotAreaPage ( browser ) ;
24
+ await browser . url ( '#light/utils/screenshot-area-warning' ) ;
25
+ await page . waitForVisible ( '.screenshot-area' ) ;
26
+ await expect ( page . isWarningDisplayed ( ) ) . resolves . toBe ( false ) ;
27
+ await page . clickAddItems ( ) ;
28
+ await expect ( page . isWarningDisplayed ( ) ) . resolves . toBe ( true ) ;
29
+ await page . clickRemoveItems ( ) ;
30
+ await expect ( page . isWarningDisplayed ( ) ) . resolves . toBe ( false ) ;
31
+ } )
32
+ ) ;
0 commit comments