Skip to content

Commit e03e443

Browse files
committed
unstaged changes
1 parent a0f14dd commit e03e443

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

coderd/searchquery/search_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ func TestSearchWorkspace(t *testing.T) {
192192
Query: "deleting_by:2023-06-09",
193193
Expected: searchquery.PostFilter{
194194
DeletingBy: ptr.Ref(time.Date(
195-
2023, 06, 9, 0, 0, 0, 0, time.UTC)),
195+
2023, 6, 9, 0, 0, 0, 0, time.UTC)),
196196
},
197197
},
198198
{
199199
Name: "MultipleParams",
200200
Query: "deleting_by:2023-06-09 name:workspace-name",
201201
Expected: searchquery.PostFilter{
202202
DeletingBy: ptr.Ref(time.Date(
203-
2023, 06, 9, 0, 0, 0, 0, time.UTC)),
203+
2023, 6, 9, 0, 0, 0, 0, time.UTC)),
204204
},
205205
},
206206
}
Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
import { screen } from "@testing-library/react"
22
import { rest } from "msw"
33
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"
105
import { history, renderWithAuth } from "testHelpers/renderHelpers"
116
import { server } from "testHelpers/server"
127
import WorkspacesPage from "./WorkspacesPage"
138
import { i18n } from "i18n"
14-
import * as API from "api/api"
15-
import userEvent from "@testing-library/user-event"
169

1710
const { t } = i18n
1811

@@ -48,24 +41,4 @@ describe("WorkspacesPage", () => {
4841
)
4942
expect(templateDisplayNames).toHaveLength(MockWorkspacesResponse.count)
5043
})
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-
})
7144
})

0 commit comments

Comments
 (0)