import { FormState } from '../../../../components/design/FormState' describe('', () => { it('should return nothing if the state is idle', () => { cy.mount() .get('[data-cy-root]') .should('be.empty') }) it('should return nothing if the message is null', () => { cy.mount() .get('[data-cy-root]') .should('be.empty') }) it('should render the if state is loading', () => { cy.mount() .get('[data-cy=loader]') .should('be.visible') }) it('should render the success message if state is success', () => { const message = 'Success Message' cy.mount() .get('#success') .contains(message) }) it('should render the error message if state is error', () => { const message = 'Error Message' cy.mount() .get('#error') .contains(message) }) })