Skip to content

Commit 716c205

Browse files
committed
more unit tests
1 parent 9cd4e73 commit 716c205

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

site/src/pages/WorkspacePage/WorkspacePage.test.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
MockDeletingWorkspace,
2020
MockDeletedWorkspace,
2121
MockBuilds,
22+
MockTemplateVersion3,
2223
} from "testHelpers/entities"
2324
import * as api from "../../api/api"
2425
import { Workspace } from "../../api/typesGenerated"
@@ -351,4 +352,18 @@ describe("WorkspacePage", () => {
351352
expect(rows).toHaveLength(MockBuilds.length + 1)
352353
})
353354
})
355+
356+
it("shows the template warnings", async () => {
357+
server.use(
358+
rest.get(
359+
"/api/v2/templateversions/:templateVersionId",
360+
async (req, res, ctx) => {
361+
return res(ctx.status(200), ctx.json(MockTemplateVersion3))
362+
},
363+
),
364+
)
365+
366+
await renderWorkspacePage()
367+
await screen.findByTestId("warning-deprecated-parameters")
368+
})
354369
})

0 commit comments

Comments
 (0)