Skip to content

Commit 1daff36

Browse files
committed
e2e tests for security
1 parent d3790bb commit 1daff36

File tree

3 files changed

+41
-5
lines changed

3 files changed

+41
-5
lines changed

site/e2e/tests/deployment/security.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { expect, test } from "@playwright/test";
2+
import * as API from "api/api";
3+
import { setupApiCalls } from "../../api";
4+
5+
test("enabled security settings", async ({ page }) => {
6+
await setupApiCalls(page);
7+
8+
await page.goto("/deployment/security", { waitUntil: "domcontentloaded" });
9+
10+
// Load deployment settings
11+
const config = await API.getDeploymentConfig();
12+
13+
// Check flags
14+
15+
});

site/src/components/Badges/Badges.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ const styles = {
4141
} satisfies Record<string, Interpolation<Theme>>;
4242

4343
export const EnabledBadge: FC = () => {
44-
return <span css={[styles.badge, styles.enabledBadge]}>Enabled</span>;
44+
return (
45+
<span css={[styles.badge, styles.enabledBadge]} className="option-enabled">
46+
Enabled
47+
</span>
48+
);
4549
};
4650

4751
export const EntitledBadge: FC = () => {
@@ -95,6 +99,7 @@ export const DisabledBadge: FC = forwardRef<
9599
color: theme.experimental.l1.text,
96100
}),
97101
]}
102+
className="option-disabled"
98103
>
99104
Disabled
100105
</span>

site/src/pages/DeploySettingsPage/Option.tsx

+20-4
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,27 @@ export const OptionValue: FC<OptionValueProps> = (props) => {
3838
}
3939

4040
if (typeof value === "number") {
41-
return <span css={styles.option}>{value}</span>;
41+
return (
42+
<span css={styles.option} className="option-value-number">
43+
{value}
44+
</span>
45+
);
4246
}
4347

4448
if (!value || value.length === 0) {
45-
return <span css={styles.option}>Not set</span>;
49+
return (
50+
<span css={styles.option} className="option-value-empty">
51+
Not set
52+
</span>
53+
);
4654
}
4755

4856
if (typeof value === "string") {
49-
return <span css={styles.option}>{value}</span>;
57+
return (
58+
<span css={styles.option} className="option-value-string">
59+
{value}
60+
</span>
61+
);
5062
}
5163

5264
if (typeof value === "object" && !Array.isArray(value)) {
@@ -104,7 +116,11 @@ export const OptionValue: FC<OptionValueProps> = (props) => {
104116
);
105117
}
106118

107-
return <span css={styles.option}>{JSON.stringify(value)}</span>;
119+
return (
120+
<span css={styles.option} className="option-value-json">
121+
{JSON.stringify(value)}
122+
</span>
123+
);
108124
};
109125

110126
type OptionConfigProps = HTMLAttributes<HTMLDivElement> & { isSource: boolean };

0 commit comments

Comments
 (0)