Skip to content

Instantly share code, notes, and snippets.

@DSchau
Last active April 17, 2020 01:07
Show Gist options
  • Select an option

  • Save DSchau/5b37ac430cc0b795728c7f476d2af6b3 to your computer and use it in GitHub Desktop.

Select an option

Save DSchau/5b37ac430cc0b795728c7f476d2af6b3 to your computer and use it in GitHub Desktop.
Cypress + Gatsby Recipe
{
"baseUrl": "http://localhost:8000"
}
describe('My home page', () => {
beforeEach(() => {
cy.visit('/')
})
/*
* TODO: make this test work
*/
it('contains the text hello gatsby', () => {
expect(cy.getByText('sup')).should('eq', 'Hello Gatsby')
})
})
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
import '@testing-library/cypress/add-commands'
import 'gatsby-cypress'
// custom commands?
// import './commands'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment