Last active
April 17, 2020 01:07
-
-
Save DSchau/5b37ac430cc0b795728c7f476d2af6b3 to your computer and use it in GitHub Desktop.
Cypress + Gatsby Recipe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "baseUrl": "http://localhost:8000" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // *********************************************************** | |
| // 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 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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