Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upgrade frontend to React 18#3353

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ammario merged 20 commits intomainfromreact-18
Aug 22, 2022
Merged
Changes from1 commit
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
d889b18
Upgrade to React 18
ammarioAug 2, 2022
7c5c2a1
Update react-dom
ammarioAug 2, 2022
54d5cce
Replace react-helmet with react-helmet-async
ammarioAug 2, 2022
6676cb3
Chase down errors
ammarioAug 2, 2022
8a0a73f
Simplify FC defs
ammarioAug 2, 2022
4928cf7
Run prettier
ammarioAug 2, 2022
8358053
Pin all new deps
ammarioAug 2, 2022
25d747d
Import PropsWithChildren in a few components
ammarioAug 2, 2022
5495f83
Fix remaining errors and most tests
ammarioAug 15, 2022
78448c4
Resolve more tests
ammarioAug 15, 2022
fafff02
Things are borked
ammarioAug 16, 2022
dab2f24
removing act; cleaning up tests
Kira-PilotAug 17, 2022
df998c2
fixed UsersPage tests
Kira-PilotAug 17, 2022
876e740
fixed CreateWorkspacePage tests
Kira-PilotAug 17, 2022
a5dc090
Wait for permissions too be loaded as well
BrunoQuaresmaAug 19, 2022
5fa1c0e
added cancelation test back
Kira-PilotAug 19, 2022
8cb1cd3
fixed workspacebuild test
Kira-PilotAug 19, 2022
087ebc2
disable floating promises in test file
Kira-PilotAug 22, 2022
29aedc6
fixing up lint
Kira-PilotAug 22, 2022
bc8a14d
resolving conflicts
Kira-PilotAug 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
added cancelation test back
  • Loading branch information
@Kira-Pilot
Kira-Pilot committedAug 19, 2022
commit5fa1c0ef96e288d710e0a90b95fe3ddb54e99df6
41 changes: 20 additions & 21 deletionssite/src/pages/WorkspacePage/WorkspacePage.test.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -114,27 +114,26 @@ describe("WorkspacePage", () => {
.mockImplementation(() => Promise.resolve(MockWorkspaceBuild))
testButton(Language.start, startWorkspaceMock)
})
// it("requests cancellation when the user presses Cancel", async () => {
// server.use(
// rest.get(`/api/v2/users/:userId/workspace/:workspaceName`, (req, res, ctx) => {
// return res(ctx.status(200), ctx.json(MockStartingWorkspace))
// }),
// )
// const cancelWorkspaceMock = jest
// .spyOn(api, "cancelWorkspaceBuild")
// .mockImplementation(() => Promise.resolve({ message: "job canceled" }))
//
// await renderWorkspacePage()
//
// const cancelButton = await screen.findByRole("button", {
// name: "cancel action",
// })
//
// fireEvent.click(cancelButton)
// // await waitFor(() => fireEvent.click(cancelButton))
//
// expect(cancelWorkspaceMock).toBeCalled()
// })
it("requests cancellation when the user presses Cancel", async () => {
server.use(
rest.get(`/api/v2/users/:userId/workspace/:workspaceName`, (req, res, ctx) => {
return res(ctx.status(200), ctx.json(MockStartingWorkspace))
}),
)
const cancelWorkspaceMock = jest
.spyOn(api, "cancelWorkspaceBuild")
.mockImplementation(() => Promise.resolve({ message: "job canceled" }))

await renderWorkspacePage()

const cancelButton = await screen.findByRole("button", {
name: "cancel action",
})

fireEvent.click(cancelButton)

expect(cancelWorkspaceMock).toBeCalled()
})
it("requests a template when the user presses Update", async () => {
const getTemplateMock = jest.spyOn(api, "getTemplate").mockResolvedValueOnce(MockTemplate)
server.use(
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp