@@ -11,18 +11,22 @@ test("enabled security settings", async ({ page }) => {
11
11
const config = await API . getDeploymentConfig ( ) ;
12
12
13
13
// Check flags
14
- await expectConfigOption ( page , config , "ssh-keygen-algorithm" )
15
- await expectConfigOption ( page , config , "secure-auth-cookie" )
16
- await expectConfigOption ( page , config , "disable-owner-workspace-access" )
17
-
18
- await expectConfigOption ( page , config , "tls-redirect-http-to-https" )
19
- await expectConfigOption ( page , config , "strict-transport-security" )
20
- await expectConfigOption ( page , config , "tls-address" )
21
- await expectConfigOption ( page , config , "tls-allow-insecure-ciphers" )
14
+ await expectConfigOption ( page , config , "ssh-keygen-algorithm" ) ;
15
+ await expectConfigOption ( page , config , "secure-auth-cookie" ) ;
16
+ await expectConfigOption ( page , config , "disable-owner-workspace-access" ) ;
17
+
18
+ await expectConfigOption ( page , config , "tls-redirect-http-to-https" ) ;
19
+ await expectConfigOption ( page , config , "strict-transport-security" ) ;
20
+ await expectConfigOption ( page , config , "tls-address" ) ;
21
+ await expectConfigOption ( page , config , "tls-allow-insecure-ciphers" ) ;
22
22
} ) ;
23
23
24
- const expectConfigOption = async ( page :Page , config : API . DeploymentConfig , flag : string ) => {
25
- let value = config . options . find ( option => option . flag === flag ) ?. value ;
24
+ const expectConfigOption = async (
25
+ page : Page ,
26
+ config : API . DeploymentConfig ,
27
+ flag : string ,
28
+ ) => {
29
+ let value = config . options . find ( ( option ) => option . flag === flag ) ?. value ;
26
30
if ( value === undefined ) {
27
31
throw new Error ( `Option with env ${ flag } has undefined value.` ) ;
28
32
}
@@ -44,6 +48,8 @@ const expectConfigOption = async(page :Page, config: API.DeploymentConfig, flag:
44
48
type = "option-value-json" ;
45
49
}
46
50
47
- const configOption = page . locator ( `div.options-table .option-${ flag } .${ type } ` ) ;
51
+ const configOption = page . locator (
52
+ `div.options-table .option-${ flag } .${ type } ` ,
53
+ ) ;
48
54
await expect ( configOption ) . toHaveText ( String ( value ) ) ;
49
- }
55
+ } ;
0 commit comments