Download react-hook-form/cypress/e2e/setValueCustomRegister.cy.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/setValueCustomRegister.cy.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-hook-form/cypress/e2e/setValueCustomRegister.cy.ts
-
curl -L -o setValueCustomRegister.cy.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/setValueCustomRegister.cy.ts
748 Bytes
| describe('setValue with react native or web', () => { | |
| it('should only trigger re-render when form state changed or error triggered', () => { | |
| cy.visit('http://localhost:3000/setValueCustomRegister'); | |
| cy.get('#dirty').contains('false'); | |
| cy.get('#TriggerDirty').click(); | |
| cy.get('#dirty').contains('true'); | |
| cy.get('#TriggerNothing').click(); | |
| cy.get('#TriggerNothing').click(); | |
| cy.get('#TriggerNothing').click(); | |
| cy.get('#TriggerNothing').click(); | |
| cy.get('#WithError').click(); | |
| cy.get('#WithError').click(); | |
| cy.get('#WithoutError').click(); | |
| cy.get('#WithoutError').click(); | |
| cy.get('#WithError').click(); | |
| cy.get('#TriggerNothing').click(); | |
| cy.get('#renderCount').contains('8'); | |
| }); | |
| }); | |