test(site): add e2e tests for workspace proxies (#13009)

This commit is contained in:
Marcin Tojek
2024-04-19 14:45:52 +02:00
committed by GitHub
parent 3aa0d73811
commit 3d7740bd32
8 changed files with 164 additions and 5 deletions
+7
View File
@@ -1270,6 +1270,13 @@ export const getWorkspaceProxies = async (): Promise<
return response.data;
};
export const createWorkspaceProxy = async (
b: TypesGen.CreateWorkspaceProxyRequest,
): Promise<TypesGen.UpdateWorkspaceProxyResponse> => {
const response = await axios.post(`/api/v2/workspaceproxies`, b);
return response.data;
};
export const getAppearance = async (): Promise<TypesGen.AppearanceConfig> => {
try {
const response = await axios.get(`/api/v2/appearance`);
@@ -41,6 +41,7 @@ export const LoginPageView: FC<LoginPageViewProps> = ({
css={{
maxWidth: "200px",
}}
className="application-logo"
/>
) : (
<CoderIcon fill="white" opacity={1} css={styles.icon} />
@@ -40,7 +40,7 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
return (
<>
<TableRow key={proxy.name} data-testid={proxy.name}>
<TableCell>
<TableCell className="name">
<AvatarData
title={
proxy.display_name && proxy.display_name.length > 0
@@ -60,8 +60,12 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
/>
</TableCell>
<TableCell css={{ fontSize: 14 }}>{proxy.path_app_url}</TableCell>
<TableCell css={{ fontSize: 14 }}>{statusBadge}</TableCell>
<TableCell css={{ fontSize: 14 }} className="url">
{proxy.path_app_url}
</TableCell>
<TableCell css={{ fontSize: 14 }} className="status">
{statusBadge}
</TableCell>
<TableCell
css={{
fontSize: 14,