|
1 | 1 | import { screen } from "@testing-library/react"
|
2 | 2 | import { rest } from "msw"
|
3 | 3 | import * as CreateDayString from "utils/createDayString"
|
4 |
| -import { |
5 |
| - MockWorkspace, |
6 |
| - MockWorkspacesResponse, |
7 |
| - MockEntitlementsWithScheduling, |
8 |
| - MockWorkspacesResponseWithDeletions, |
9 |
| -} from "testHelpers/entities" |
| 4 | +import { MockWorkspace, MockWorkspacesResponse } from "testHelpers/entities" |
10 | 5 | import { history, renderWithAuth } from "testHelpers/renderHelpers"
|
11 | 6 | import { server } from "testHelpers/server"
|
12 | 7 | import WorkspacesPage from "./WorkspacesPage"
|
13 | 8 | import { i18n } from "i18n"
|
14 |
| -import * as API from "api/api" |
15 |
| -import userEvent from "@testing-library/user-event" |
16 | 9 |
|
17 | 10 | const { t } = i18n
|
18 | 11 |
|
@@ -48,24 +41,4 @@ describe("WorkspacesPage", () => {
|
48 | 41 | )
|
49 | 42 | expect(templateDisplayNames).toHaveLength(MockWorkspacesResponse.count)
|
50 | 43 | })
|
51 |
| - |
52 |
| - it("displays banner for impending deletions", async () => { |
53 |
| - jest |
54 |
| - .spyOn(API, "getEntitlements") |
55 |
| - .mockResolvedValue(MockEntitlementsWithScheduling) |
56 |
| - |
57 |
| - jest |
58 |
| - .spyOn(API, "getWorkspaces") |
59 |
| - .mockResolvedValue(MockWorkspacesResponseWithDeletions) |
60 |
| - |
61 |
| - renderWithAuth(<WorkspacesPage />) |
62 |
| - |
63 |
| - const banner = await screen.findByText( |
64 |
| - "You have workspaces that will be deleted soon due to inactivity. To keep these workspaces, connect to them via SSH or the web terminal.", |
65 |
| - ) |
66 |
| - const user = userEvent.setup() |
67 |
| - await user.click(screen.getByTestId("dismiss-banner-btn")) |
68 |
| - |
69 |
| - expect(banner).toBeEmptyDOMElement |
70 |
| - }) |
71 | 44 | })
|
0 commit comments