title: How to change login test scenario to function
body: <p>I have the following login scenario for my application using Cypress.io.  Currently I am having to use all of the scenario below before each of my tests.  Is there a way to turn this into a function that I can then call as use as a 'beforeEach' test scenario?</p>
  
  <pre><code>describe('My Login Test', function (){
      it('Visit Risk App Landing Page', function (){
          const typedText = 'email@address.com'
          cy.visit('https://bvt-riskassessment.lmkcloud.net')
          cy.get('button').click()
          cy.get('a.auth0-lock-alternative-link').contains('Not your account?').click()
          cy.get('input.auth0-lock-input').first()
          .type(typedText)
          .should('have.value', typedText)
          cy.get('button').click()
          cy.url().should('eq','https://bvt-riskassessment.lmkcloud.net/workflow')
  </code></pre>