Skip to content

Commit cdf8859

Browse files
committed
Remove unused code from template warning
1 parent 878f995 commit cdf8859

File tree

3 files changed

+0
-38
lines changed

3 files changed

+0
-38
lines changed

site/src/pages/TemplatePage/TemplateSummaryPage/TemplateSummaryPageView.stories.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Meta, StoryObj } from "@storybook/react";
22
import {
33
MockTemplate,
44
MockTemplateVersion,
5-
MockTemplateVersion3,
65
MockWorkspaceResource,
76
MockWorkspaceVolumeResource,
87
} from "testHelpers/entities";
@@ -31,11 +30,3 @@ export const NoIcon: Story = {
3130
resources: [MockWorkspaceResource, MockWorkspaceVolumeResource],
3231
},
3332
};
34-
35-
export const WithDeprecatedParameters: Story = {
36-
args: {
37-
template: MockTemplate,
38-
activeVersion: MockTemplateVersion3,
39-
resources: [MockWorkspaceResource, MockWorkspaceVolumeResource],
40-
},
41-
};

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
MockTemplateVersionParameter1,
1313
MockTemplateVersionParameter2,
1414
MockBuilds,
15-
MockTemplateVersion3,
1615
MockUser,
1716
MockDeploymentConfig,
1817
} from "testHelpers/entities";
@@ -267,20 +266,6 @@ describe("WorkspacePage", () => {
267266
});
268267
});
269268

270-
it("shows the template warning", async () => {
271-
server.use(
272-
rest.get(
273-
"/api/v2/templateversions/:templateVersionId",
274-
async (req, res, ctx) => {
275-
return res(ctx.status(200), ctx.json(MockTemplateVersion3));
276-
},
277-
),
278-
);
279-
280-
await renderWorkspacePage();
281-
await screen.findByTestId("error-unsupported-workspaces");
282-
});
283-
284269
it("restart the workspace with one time parameters when having the confirmation dialog", async () => {
285270
window.localStorage.removeItem(`${MockUser.id}_ignoredWarnings`);
286271
jest.spyOn(api, "getWorkspaceParameters").mockResolvedValue({

site/src/testHelpers/entities.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -401,20 +401,6 @@ You can add instructions here
401401
archived: false,
402402
};
403403

404-
export const MockTemplateVersion3: TypesGen.TemplateVersion = {
405-
id: "test-template-version-3",
406-
created_at: "2022-05-17T17:39:01.382927298Z",
407-
updated_at: "2022-05-17T17:39:01.382927298Z",
408-
template_id: "test-template",
409-
job: MockProvisionerJob,
410-
name: "test-version-3",
411-
message: "first version",
412-
readme: "README",
413-
created_by: MockUser,
414-
warnings: ["UNSUPPORTED_WORKSPACES"],
415-
archived: false,
416-
};
417-
418404
export const MockTemplate: TypesGen.Template = {
419405
id: "test-template",
420406
created_at: "2022-05-17T17:39:01.382927298Z",

0 commit comments

Comments
 (0)