Skip to content

Commit

Permalink
Maintenance: Switch from yarn to pnpm package manager for Node.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Jul 3, 2024
1 parent 71b690e commit d5f7505
Show file tree
Hide file tree
Showing 55 changed files with 23,873 additions and 21,400 deletions.
2 changes: 2 additions & 0 deletions .buildpacks
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/heroku/heroku-buildpack-nodejs.git#v248
https://github.com/pkgr/heroku-buildpack-ruby.git#v267-1
1,845 changes: 1,845 additions & 0 deletions .dev/cypress/pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .dev/cypress/visual-regression/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ This command only _updates_ snapshots. Cypress will run only tests with `*-visua

```sh
# from the root directory
$ yarn cypress:snapshots
$ pnpm cypress:snapshots
```

Please, make sure snapshot is actually correct before pushing your changes.

## Running Tests

Although you may run visual tests using `yarn test:ci:ct` command, this will execute them in your current development environment. However, stored image snapshots were generated in Docker containers in order to achieve consistent environment every time. Due to multiple factors (i.e. screen density, font resolution, browser version, etc), your mileage may vary and you may receive false negatives.
Although you may run visual tests using `pnpm test:ci:ct` command, this will execute them in your current development environment. However, stored image snapshots were generated in Docker containers in order to achieve consistent environment every time. Due to multiple factors (i.e. screen density, font resolution, browser version, etc), your mileage may vary and you may receive false negatives.

It is therefore advisable to run the visual regression tests in the same environment where the image snapshots are normally updated. You can do this by setting an environment variable and running the snapshots command:

```sh
# from the root directory
$ CYPRESS_UPDATE_SNAPSHOTS=false yarn cypress:snapshots
$ CYPRESS_UPDATE_SNAPSHOTS=false pnpm cypress:snapshots
```

## Multiple Architecture (AMD64 vs ARM)
Expand Down
6 changes: 3 additions & 3 deletions .dev/cypress/visual-regression/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

yarn install --frozen-lockfile --ignore-scripts
yarn cypress:install --frozen-lockfile
yarn test:ci:ct --env pluginVisualRegressionUpdateImages=$CYPRESS_UPDATE_SNAPSHOTS --spec '../**/*-visuals.cy.*'
pnpm install --frozen-lockfile --ignore-scripts
pnpm cypress:install --frozen-lockfile
pnpm test:ci:ct --env pluginVisualRegressionUpdateImages=$CYPRESS_UPDATE_SNAPSHOTS --spec '../**/*-visuals.cy.*'
1,656 changes: 0 additions & 1,656 deletions .dev/cypress/yarn.lock

This file was deleted.

Loading

0 comments on commit d5f7505

Please sign in to comment.