Skip to content

Commit c65bb92

Browse files
committed
WIP
1 parent 5ddcb6d commit c65bb92

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

+10-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ const expectConfigOption = async (
2626
config: API.DeploymentConfig,
2727
flag: string,
2828
) => {
29-
let value = config.options.find((option) => option.flag === flag)?.value;
30-
if (value === undefined) {
29+
const opt = config.options.find((option) => option.flag === flag);
30+
if (opt === undefined) {
3131
throw new Error(`Option with env ${flag} has undefined value.`);
3232
}
3333

34-
let type = "";
34+
let type = "",
35+
value = opt.value;
3536
if (typeof value === "boolean") {
3637
type = value ? "option-enabled" : "option-disabled";
3738
value = value ? "Enabled" : "Disabled";
@@ -48,6 +49,12 @@ const expectConfigOption = async (
4849
type = "option-value-json";
4950
}
5051

52+
// Special cases
53+
if (opt.flag === "strict-transport-security" && opt.value === 0) {
54+
type = "option-value-string";
55+
value = "Disabled";
56+
}
57+
5158
const configOption = page.locator(
5259
`div.options-table .option-${flag} .${type}`,
5360
);

0 commit comments

Comments
 (0)