https://cypress.io logo
This is how I solve readability. I define the func...
# best-practices
l
This is how I solve readability. I define the functions further down the file.
Copy code
js
describe('register page', () => {
  it('behaves correctly', () => {
    visitRegisterPage()
    shouldSeePasswordResetLink()
    submitEmptyForm()
    shouldSeeValidationErrors()
    submitFormWithExistingEmail()
    shouldSeeErrorForInvalidEmail()
    shouldSeeSignInLinkInError()
    shouldSeePasswordResetLinkInError()
    submitFormWithWrongConfirmEmail()
    shouldDisplayErrorForEmailMismatch()
    submitFormProperly()
    modalShouldAppear()
    dashboardValuesShouldBeCorrect()
  })
})