@@ -10,27 +10,26 @@ test("experiments", async ({ page }) => {
10
10
const enabledExperiments = await API . getExperiments ( ) ;
11
11
12
12
// Verify if the site lists the same experiments
13
- await page . goto ( "/deployment/general" , { waitUntil : "domcontentloaded " } ) ;
13
+ await page . goto ( "/deployment/general" , { waitUntil : "networkidle " } ) ;
14
14
15
15
const experimentsLocator = page . locator (
16
16
"div.options-table tr.option-experiments ul.option-array" ,
17
17
) ;
18
- await expect ( experimentsLocator ) . toBeVisible ( ) ;
19
- await experimentsLocator . scrollIntoViewIfNeeded ( )
18
+ await experimentsLocator . scrollIntoViewIfNeeded ( ) ;
20
19
21
20
// Firstly, check if available experiments are listed
22
21
availableExperiments . safe . map ( async ( experiment ) => {
23
22
const experimentLocator = experimentsLocator . locator (
24
23
`li.option-array-item-${ experiment } ` ,
25
24
) ;
26
- await expect ( experimentLocator ) . toBeVisible ( ) ;
25
+ await expect ( experimentLocator ) . toBeInViewport ( ) ;
27
26
} ) ;
28
27
29
28
// Secondly, check if all enabled experiments are listed
30
29
enabledExperiments . map ( async ( experiment ) => {
31
30
const experimentLocator = experimentsLocator . locator (
32
31
`li.option-array-item-${ experiment } .option-enabled` ,
33
32
) ;
34
- await expect ( experimentLocator ) . toBeVisible ( ) ;
33
+ await expect ( experimentLocator ) . toBeInViewport ( ) ;
35
34
} ) ;
36
35
} ) ;
0 commit comments