Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
Next Next commit
chore: Remove disabled check at the start of the test
  • Loading branch information
Parkreiner committed Sep 20, 2023
commit 507dc80d30a0930e6d71e1e3232e4314d17083cd
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ const fillAndSubmitForm = async ({
}: FillAndSubmitConfig) => {
const user = userEvent.setup();

const submitButton = screen.getByRole("button", {
name: FooterFormLanguage.defaultSubmitLabel,
});

// This should be removed once we start removing disabled states from the UI;
// not worried about this getting forgotten, because it will trigger an error
// at some point once that migration starts
expect(submitButton).toBeDisabled();

if (default_ttl_ms) {
const defaultTtlField = await screen.findByLabelText(
"Default autostop (hours)",
Expand Down Expand Up @@ -102,6 +93,10 @@ const fillAndSubmitForm = async ({
);
}

const submitButton = screen.getByRole("button", {
name: FooterFormLanguage.defaultSubmitLabel,
});

expect(submitButton).not.toBeDisabled();
await user.click(submitButton);

Expand Down