Skip to content

Commit

Permalink
chore: update cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed Dec 11, 2023
1 parent 45c6255 commit 9f9776c
Show file tree
Hide file tree
Showing 21 changed files with 669 additions and 270 deletions.
28 changes: 28 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineConfig } from 'cypress'
import { addMatchImageSnapshotPlugin } from '@simonsmith/cypress-image-snapshot/plugin'

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
video: false,
scrollBehavior: false,
fixturesFolder: false,
screenshotOnRunFailure: false,
excludeSpecPattern: ['**/__snapshots__/*'],
viewportHeight: 600,
viewportWidth: 1200,
setupNodeEvents(on) {
addMatchImageSnapshotPlugin(on)

on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--force-device-scale-factor=1')

if (browser.name === 'electron' && browser.isHeadless) {
console.log(launchOptions)
}

return launchOptions
})
},
},
})
8 changes: 0 additions & 8 deletions cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ describe('Parallax - vertical', () => {
})

it('should translate layers as expected', () => {
// initial snapshot
console.log(HEIGHT, WIDTH)

cy.findByTestId('container').matchImageSnapshot('vertical #1', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})
Expand Down
6 changes: 0 additions & 6 deletions cypress/plugins/index.js

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions cypress/support/commands.js

This file was deleted.

4 changes: 4 additions & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '@testing-library/cypress/add-commands'
import { addMatchImageSnapshotCommand } from '@simonsmith/cypress-image-snapshot/command'

addMatchImageSnapshotCommand()
20 changes: 0 additions & 20 deletions cypress/support/index.js

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@
"@react-three/fiber": "^8.11.9",
"@remix-run/dev": "patch:@remix-run/dev@npm%3A1.15.0#./.yarn/patches/@remix-run-dev-npm-1.15.0-33b55fa3ee.patch",
"@remix-run/serve": "^1.15.0",
"@simonsmith/cypress-image-snapshot": "^9.0.1",
"@swc/core": "^1.3.41",
"@swc/jest": "^0.2.24",
"@testing-library/cypress": "^8.0.7",
"@testing-library/cypress": "^10.0.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/fs-extra": "^11.0.1",
Expand All @@ -85,8 +86,7 @@
"@types/react-native": "^0.71.3",
"@types/styled-components": "^5.1.26",
"@types/three": "^0.149.0",
"cypress": "^9.7.0",
"cypress-image-snapshot": "^4.0.1",
"cypress": "^13.6.1",
"eslint": "^8.36.0",
"flush-microtasks": "^1.0.1",
"husky": "^8.0.3",
Expand All @@ -102,12 +102,12 @@
"react-native": "^0.71.3",
"react-zdog": "^1.0.11",
"spec.ts": "^1.1.3",
"start-server-and-test": "^2.0.0",
"start-server-and-test": "^2.0.3",
"three": "^0.150.1",
"tsup": "^6.7.0",
"turbo": "^1.8.3",
"typescript": "5.2.2",
"vite": "^4.1.4",
"vite": "^5.0.7",
"zdog": "^1.1.3"
},
"publishConfig": {
Expand Down
Loading

0 comments on commit 9f9776c

Please sign in to comment.