Skip to content

Commit 5ddcb6d

Browse files
committed
WIP
1 parent 8156910 commit 5ddcb6d

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

site/e2e/tests/deployment/security.spec.ts

+18-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,22 @@ test("enabled security settings", async ({ page }) => {
1111
const config = await API.getDeploymentConfig();
1212

1313
// 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");
2222
});
2323

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;
2630
if (value === undefined) {
2731
throw new Error(`Option with env ${flag} has undefined value.`);
2832
}
@@ -44,6 +48,8 @@ const expectConfigOption = async(page :Page, config: API.DeploymentConfig, flag:
4448
type = "option-value-json";
4549
}
4650

47-
const configOption = page.locator(`div.options-table .option-${flag} .${type}`);
51+
const configOption = page.locator(
52+
`div.options-table .option-${flag} .${type}`,
53+
);
4854
await expect(configOption).toHaveText(String(value));
49-
}
55+
};

0 commit comments

Comments
 (0)