Skip to content

Commit

Permalink
Update to React 18 (#329)
Browse files Browse the repository at this point in the history
* Update to React 18

* remove material-ui-popup-state dependency

* fix home page testing

* try to fix home mobile test

* use node 16

* try to fix mobile test

* update cypress action to v3

* fix home page hydration issues

* Don't use lazy/Suspense for portfolio due to error

* update dependencies

* don't use styled with GatsbyImage

* update dependencies

* update dependencies

* update dependencies

* Disable WebGL in Cypress Headless

* update dependencies

* update react

* update dependencies
  • Loading branch information
dan-mba authored Apr 29, 2022
1 parent a6098c1 commit eebd309
Show file tree
Hide file tree
Showing 15 changed files with 2,178 additions and 2,608 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
"no-extra-semi": 0,
"react/jsx-uses-react": 'off',
"react/prop-types": 0,
"react/react-in-jsx-scope": 'off'
"react/react-in-jsx-scope": 'off',
},
"settings": {
"react": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3

- name: Cypress
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v3
env:
GITHUB_TOKEN: ${{ secrets.BUILD_GITHUB_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/home_page_mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ describe('Home Page', () => {
it('successfully loads', () => {
cy.visit('/')
})

it('Menu loads', () => {
cy.get('#menu-button').click()
cy.get('#menu-drawer').should('be.visible')
})
})
})
14 changes: 12 additions & 2 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
*/
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('before:browser:launch', (browser = {}, launchOptions) => {
// `args` is an array of all the arguments that will
// be passed to browsers when it launches

if (browser.isHeadless) {
// disable WebGL for headless browsers
launchOptions.args.push('--disable-software-rasterizer')
}

// whatever you return here becomes the launchOptions
return launchOptions
})
}
1 change: 0 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ module.exports = {
},
},
},
'gatsby-plugin-loadable-components-ssr',
//'gatsby-plugin-webpack-bundle-analyser-v2'
],
};
Loading

0 comments on commit eebd309

Please sign in to comment.