storybook/docs/_snippets/component-cypress-test.md
2024-06-13 17:53:08 +01:00

17 lines
542 B
Markdown

```js filename="/cypress/integration/Login.spec.js" renderer="common" language="js"
/// <reference types="cypress" />
describe('Login Form', () => {
it('Should contain valid login information', () => {
cy.visit('/iframe.html?id=components-login-form--example');
cy.get('#login-form').within(() => {
cy.log('**enter the email**');
cy.get('#email').should('have.value', 'email@provider.com');
cy.log('**enter password**');
cy.get('#password').should('have.value', 'a-random-password');
});
});
});
```