Skip to content

Commit

Permalink
🌫️ close #12148 support isValid when mode is set to onBlur (#12194)
Browse files Browse the repository at this point in the history
* 🌫️ close #12148 support isValid when mode is set to onBlur

* update unit tests coverage

* update with automation tests
  • Loading branch information
bluebill1049 authored Aug 18, 2024
1 parent 7b61061 commit 81f472c
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 47 deletions.
80 changes: 40 additions & 40 deletions app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cypress/e2e/formState.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ describe('form state', () => {
isValid: true,
}),
);
cy.get('#renderCount').contains('15');
cy.get('#renderCount').contains('14');
});

it('should reset dirty value when inputs reset back to default with onSubmit mode', () => {
Expand Down Expand Up @@ -496,7 +496,7 @@ describe('form state', () => {
isValid: false,
}),
);
cy.get('#renderCount').contains('9');
cy.get('#renderCount').contains('8');
});

it('should reset dirty value when inputs reset back to default with onChange mode', () => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/formStateWithNestedFields.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('form state with nested fields', () => {
isValid: true,
}),
);
cy.get('#renderCount').contains('15');
cy.get('#renderCount').contains('14');
});

it('should reset dirty value when inputs reset back to default with onSubmit mode', () => {
Expand Down Expand Up @@ -359,7 +359,7 @@ describe('form state with nested fields', () => {
isValid: false,
}),
);
cy.get('#renderCount').contains('9');
cy.get('#renderCount').contains('8');
});

it('should reset dirty value when inputs reset back to default with onChange mode', () => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/formStateWithSchema.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ describe('form state with schema validation', () => {
isValid: true,
}),
);
cy.get('#renderCount').contains('15');
cy.get('#renderCount').contains('14');
});

it('should reset dirty value when inputs reset back to default with onSubmit mode', () => {
Expand Down Expand Up @@ -495,7 +495,7 @@ describe('form state with schema validation', () => {
isValid: false,
}),
);
cy.get('#renderCount').contains('9');
cy.get('#renderCount').contains('8');
});

it('should reset dirty value when inputs reset back to default with onChange mode', () => {
Expand Down
Loading

0 comments on commit 81f472c

Please sign in to comment.