Download react-hook-form/cypress/e2e/defaultValuesAsync.cy.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/defaultValuesAsync.cy.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-hook-form/cypress/e2e/defaultValuesAsync.cy.ts
-
curl -L -o defaultValuesAsync.cy.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-hook-form/cypress/e2e/defaultValuesAsync.cy.ts
1.14 kB
| describe('defaultValues async', () => { | |
| it('should populate defaultValue async for inputs', () => { | |
| cy.visit('http://localhost:3000/default-values-async'); | |
| cy.wait(10); | |
| cy.get('input[name="test"]').should('have.value', 'test'); | |
| cy.get('input[name="test1.firstName"]').should('have.value', 'firstName'); | |
| cy.get('input[name="test1.lastName.0"]').should('have.value', 'lastName0'); | |
| cy.get('input[name="test1.lastName.1"]').should('have.value', 'lastName1'); | |
| cy.get('input[name="checkbox"]').eq(0).should('have.checked'); | |
| cy.get('input[name="checkbox"]').eq(1).should('have.checked'); | |
| cy.get('input[name="checkbox"]').eq(0).click(); | |
| cy.get('#toggle').click(); | |
| cy.get('#toggle').click(); | |
| cy.get('input[name="checkbox"]').eq(0).should('not.have.checked'); | |
| cy.get('input[name="checkbox"]').eq(1).should('have.checked'); | |
| cy.get('input[name="checkbox"]').eq(1).click(); | |
| cy.get('#toggle').click(); | |
| cy.get('#toggle').click(); | |
| cy.get('input[name="checkbox"]').eq(0).should('not.have.checked'); | |
| cy.get('input[name="checkbox"]').eq(1).should('not.have.checked'); | |
| }); | |
| }); | |