Skip to content

feat: Add template version warnings #7483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
May 12, 2023
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")
})
})