Download react-hook-form/cypress/e2e/triggerValidation.cy.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 603 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/triggerValidation.cy.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-hook-form/cypress/e2e/triggerValidation.cy.ts
-
curl -L -o triggerValidation.cy.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/triggerValidation.cy.ts
603 Bytes
| describe('form trigger', () => { | |
| it('should trigger input validation', () => { | |
| cy.visit('http://localhost:3000/trigger-validation'); | |
| cy.get('#testError').should('be.empty'); | |
| cy.get('#test1Error').should('be.empty'); | |
| cy.get('#test2Error').should('be.empty'); | |
| cy.get('#single').click(); | |
| cy.get('#testError').contains('required'); | |
| cy.get('#single').click(); | |
| cy.get('#multiple').click(); | |
| cy.get('#test1Error').contains('required'); | |
| cy.get('#test2Error').contains('required'); | |
| cy.get('#multiple').click(); | |
| cy.get('#renderCount').contains('6'); | |
| }); | |
| }); | |