Skip to content

fix: only allow submitting form if changes have been made #14602

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
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
Prev Previous commit
test: fix tests
  • Loading branch information
DanielleMaywood committed Sep 13, 2024
commit bdc659dbe1f26ecfef841ae4166341f125664f16
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ test("Submit the workspace settings page successfully", async () => {
);
await user.clear(parameter2);
await user.type(parameter2, "1");
await user.click(within(form).getByRole("button", { name: "Submit" }));
await user.click(
within(form).getByRole("button", { name: "Submit and restart" }),
);
// Assert that the API calls were made with the correct data
await waitFor(() => {
expect(postWorkspaceBuildSpy).toHaveBeenCalledWith(MockWorkspace.id, {
Expand Down Expand Up @@ -102,7 +104,7 @@ test("Submit button is only enabled when changes are made", async () => {
await waitForLoaderToBeRemoved();

const submitButton: HTMLButtonElement = screen.getByRole("button", {
name: "Submit",
name: "Submit and restart",
});

const form = screen.getByTestId("form");
Expand Down
Loading