Skip to content

Commit 69bba2f

Browse files
committed
chore: update cypress
1 parent 743a888 commit 69bba2f

21 files changed

+669
-270
lines changed

cypress.config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { defineConfig } from 'cypress'
2+
import { addMatchImageSnapshotPlugin } from '@simonsmith/cypress-image-snapshot/plugin'
3+
4+
export default defineConfig({
5+
e2e: {
6+
baseUrl: 'http://localhost:3000',
7+
video: false,
8+
scrollBehavior: false,
9+
fixturesFolder: false,
10+
screenshotOnRunFailure: false,
11+
excludeSpecPattern: ['**/__snapshots__/*'],
12+
viewportHeight: 600,
13+
viewportWidth: 1200,
14+
setupNodeEvents(on) {
15+
addMatchImageSnapshotPlugin(on)
16+
17+
on('before:browser:launch', (browser, launchOptions) => {
18+
launchOptions.args.push('--force-device-scale-factor=1')
19+
20+
if (browser.name === 'electron' && browser.isHeadless) {
21+
console.log(launchOptions)
22+
}
23+
24+
return launchOptions
25+
})
26+
},
27+
},
28+
})

cypress.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

cypress/integration/parallax.spec.js renamed to cypress/e2e/parallax.cy.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ describe('Parallax - vertical', () => {
99
})
1010

1111
it('should translate layers as expected', () => {
12-
// initial snapshot
13-
console.log(HEIGHT, WIDTH)
14-
1512
cy.findByTestId('container').matchImageSnapshot('vertical #1', {
1613
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
1714
})

cypress/plugins/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.
-16.5 KB
Binary file not shown.
-16 KB
Binary file not shown.
-16 KB
Binary file not shown.
-16.5 KB
Binary file not shown.
-16 KB
Binary file not shown.
-16 KB
Binary file not shown.

0 commit comments

Comments
 (0)