it("button should be enabled when checkbox is checked and other way around", async () => {
render(<SummaryForm />);
const checkbox = screen.getByRole("checkbox", {
name: /terms and conditions/i,
});
const button = screen.getByRole("button", {
name: /confirm order/i,
});
await userEvent.click(checkbox);
expect(checkbox).toBeChecked();
expect(button).toBeEnabled();
await userEvent.click(checkbox);
expect(checkbox).not.toBeChecked();
expect(button).toBeDisabled();
});saveStatusWidthDebounce: debounce(1000, false, function() {
this.saveStatus();
}),