Skip to content

Commit ee276b3

Browse files
committed
fix reset form method when is try to click on the reset button
1 parent bf28f9c commit ee276b3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/testsuite/cypress/support/form-editing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Cypress.Commands.add("cancelForm", (formId) => {
1717

1818
Cypress.Commands.add("resetForm", (formId, managementApi, address) => {
1919
const resetButton = "#" + formId + ' a.clickable[data-operation="reset"';
20-
cy.get(resetButton).click();
20+
// Setting the force parameter to true is a workaround turning off cypress checks whether the reset button is clickable,
21+
// as those checks sometimes fail. Next lines check the functionality (not) invoked by the button sufficiently.
22+
cy.get(resetButton).click({ force: true });
2123
cy.get("body").then(($body) => {
2224
if ($body.find(".modal-footer .btn-hal.btn-primary").length) {
2325
cy.get(".modal-footer .btn-hal.btn-primary").click({ force: true });

0 commit comments

Comments
 (0)