Skip to content

Commit 50c861d

Browse files
committed
Add mock to deployment config and fix fragment warning
1 parent 76e94fb commit 50c861d

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

site/src/components/Filter/filter.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -353,20 +353,18 @@ const PresetMenu = ({
353353
View advanced filtering
354354
</MenuItem>
355355
{learnMoreLink2 && learnMoreLabel2 && (
356-
<>
357-
<MenuItem
358-
component="a"
359-
href={learnMoreLink2}
360-
target="_blank"
361-
sx={{ fontSize: 13, fontWeight: 500 }}
362-
onClick={() => {
363-
setIsOpen(false);
364-
}}
365-
>
366-
<OpenInNewOutlined sx={{ fontSize: "14px !important" }} />
367-
{learnMoreLabel2}
368-
</MenuItem>
369-
</>
356+
<MenuItem
357+
component="a"
358+
href={learnMoreLink2}
359+
target="_blank"
360+
sx={{ fontSize: 13, fontWeight: 500 }}
361+
onClick={() => {
362+
setIsOpen(false);
363+
}}
364+
>
365+
<OpenInNewOutlined sx={{ fontSize: "14px !important" }} />
366+
{learnMoreLabel2}
367+
</MenuItem>
370368
)}
371369
</Menu>
372370
</>

site/src/pages/UsersPage/UsersPage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ describe("UsersPage", () => {
302302
});
303303
});
304304
describe("when activation fails", () => {
305-
it("shows an error message", async () => {
305+
it.only("shows an error message", async () => {
306306
renderPage();
307307

308308
await activateUser(() => {

site/src/testHelpers/handlers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ export const handlers = [
341341
return res(ctx.status(200), ctx.json(M.MockDeploymentStats));
342342
}),
343343

344+
rest.get("/api/v2/deployment/config", (_, res, ctx) => {
345+
return res(ctx.status(200), ctx.json(M.MockDeploymentConfig));
346+
}),
347+
344348
rest.get(
345349
"/api/v2/workspacebuilds/:workspaceBuildId/parameters",
346350
(_, res, ctx) => {

0 commit comments

Comments
 (0)