Skip to content

Commit

Permalink
tests: tried testing for that bug, but it passes indiscriminately (co…
Browse files Browse the repository at this point in the history
…nfusing...)
  • Loading branch information
hannahpurcell committed Oct 16, 2024
1 parent 8983399 commit 335c8f7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions assets/tests/components/detours/diversionPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1912,4 +1912,26 @@ describe("View Draft Detour", () => {
await screen.findByRole("tooltip", { name: "Copied to clipboard!" })
).toBeVisible()
})

test.only("'View Draft Detour' screen allows user to edit detour text", async () => {
const { container } = render(<DiversionPage />)

act(() => {
fireEvent.click(originalRouteShape.get(container))
})

act(() => {
fireEvent.click(originalRouteShape.get(container))
})

await userEvent.click(reviewDetourButton.get())

const input = screen.getByRole("textbox") as HTMLInputElement

act(() => {
fireEvent.change(input, { target: { value: "Hello World" } })
})

expect(input.value).toBe("Hello World")
})
})

0 comments on commit 335c8f7

Please sign in to comment.