describe('home page', () => {
  before(() => {
    cy.visit('/')
  })

  it('content', () => {
    cy.get('.dashboard-section__info-feed-date').hideElement()
    cy.get('.grid-row').compareSnapshot('homePageContent')
  })

  it('header', () => {
    cy.get('.datahub-header').compareSnapshot('homePageHeader')
  })

  it('search bar', () => {
    cy.get('.govuk-grid-column-full')
      .first()
      .compareSnapshot('homePageSearchBar')
  })
})

describe('home page', () => {
  before(() => {
    cy.visit('/')
  })

  it('content', () => {
    cy.get('.dashboard-section__info-feed-date').hideElement()
    cy.get('[for="company-name"]').should('be.visible')
    cy.get('.grid-row').compareSnapshot('homePageContent')
  })

  it('header', () => {
    cy.get('.datahub-header').compareSnapshot('homePageHeader')
  })

  it('search bar', () => {
    cy.get('.govuk-grid-column-full')
      .first()
      .compareSnapshot('homePageSearchBar')
  })
})

Add assertion to test to wait for component to load
Add assertion to test to wait for component to load
