mirror of
https://github.com/coder/coder.git
synced 2026-09-23 14:03:57 +08:00
fix: fix flaky test in WorkspacePage.test.tsx (#20033)
re-enabled the skipped test and tested locally. Passed 100 out of 100 times locally.
This commit is contained in:
@@ -309,7 +309,7 @@ describe("WorkspacePage", () => {
|
||||
// Started flaking after upgrading react-router. Tests the old parameters path
|
||||
// and isn't worth spending more time to fix since this code will be removed
|
||||
// in a few releases when dynamic parameters takes over the world.
|
||||
it.skip("updates the parameters when they are missing during update", async () => {
|
||||
it("updates the parameters when they are missing during update", async () => {
|
||||
// Mocks
|
||||
jest
|
||||
.spyOn(API, "getWorkspaceByOwnerAndName")
|
||||
@@ -340,7 +340,9 @@ describe("WorkspacePage", () => {
|
||||
|
||||
// After trying to update, a new dialog asking for missed parameters should
|
||||
// be displayed and filled
|
||||
const dialog = await waitFor(() => screen.findByTestId("dialog"));
|
||||
const dialog = await screen.findByRole("dialog", {
|
||||
name: /workspace parameters/i,
|
||||
});
|
||||
const firstParameterInput = within(dialog).getByLabelText(
|
||||
MockTemplateVersionParameter1.name,
|
||||
{ exact: false },
|
||||
|
||||
Reference in New Issue
Block a user