Skip to content
Prev Previous commit
Next Next commit
more unit tests
  • Loading branch information
mtojek committed May 11, 2023
commit 716c2057de8240de4540fdf16fa38f5d9310d846
15 changes: 15 additions & 0 deletions site/src/pages/WorkspacePage/WorkspacePage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
MockDeletingWorkspace,
MockDeletedWorkspace,
MockBuilds,
MockTemplateVersion3,
} from "testHelpers/entities"
import * as api from "../../api/api"
import { Workspace } from "../../api/typesGenerated"
Expand Down Expand Up @@ -351,4 +352,18 @@ describe("WorkspacePage", () => {
expect(rows).toHaveLength(MockBuilds.length + 1)
})
})

it("shows the template warnings", async () => {
server.use(
rest.get(
"/api/v2/templateversions/:templateVersionId",
async (req, res, ctx) => {
return res(ctx.status(200), ctx.json(MockTemplateVersion3))
},
),
)

await renderWorkspacePage()
await screen.findByTestId("warning-deprecated-parameters")
})
})