Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create workspace for backstop. #10179

Merged
merged 4 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/visual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- '**/package.json'
- 'package-lock.json'
- 'src/tests/backstop/config.js'
- 'docker/backstopjs/Dockerfile'
- 'src/tests/backstop/Dockerfile'
types:
- opened
- reopened
Expand Down
23 changes: 20 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
"prerelease-zip": "npm run build",
"release-zip": "npm run zip",
"pretest": "npm run build:production -- --display=none",
"pretest:visualtest": "VRT=1 npm run build:storybook",
eugene-manuilov marked this conversation as resolved.
Show resolved Hide resolved
"test": "npm run test:js:watch",
"test:visualtest": "npm run backstopjs -- test",
"test:visualapprove": "npm run backstopjs -- approve",
"test:visualtest": "npm run test:visualtest -w ./tests/backstop",
"test:visualapprove": "npm run test:visualapprove -w ./tests/backstop",
"test:analyze": "npm run build:production -- --env.ANALYZE",
"test:js": "cross-env BABEL_ENV=test NODE_ENV=test jest --config=tests/js/jest.config.js --passWithNoTests",
"test:js:watch": "npm run test:js -- --watch",
Expand Down Expand Up @@ -170,7 +169,6 @@
"@babel/core": "^7.14.8",
"@babel/plugin-transform-runtime": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@componentdriven/csf": "0.0.2-alpha.0",
eugene-manuilov marked this conversation as resolved.
Show resolved Hide resolved
"@jackfranklin/test-data-bot": "^2.0.0",
"@popperjs/core": "^2.9.2",
"@shopify/jest-dom-mocks": "^4.0.2",
Expand Down Expand Up @@ -254,6 +252,7 @@
"webpackbar": "^4.0.0"
},
"workspaces": [
"tests/backstop",
"tests/e2e"
]
}
File renamed without changes.
4 changes: 2 additions & 2 deletions bin/backstop → tests/backstop/bin/backstop
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

BIN_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
ROOT_DIR=$(dirname "$BIN_DIR")
ROOT_DIR="$(dirname "$BIN_DIR")/../../"

VERSION=6.1.1
IMAGE=googlesitekit/vrt:$VERSION
Expand All @@ -25,7 +25,7 @@ docker build \
--pull \
--tag $IMAGE \
--build-arg BACKSTOPJS_VERSION=$VERSION \
"$ROOT_DIR/docker/backstopjs"
"$ROOT_DIR/tests/backstop"

# Run the backstopjs command.
docker run --rm --tty \
Expand Down
12 changes: 12 additions & 0 deletions tests/backstop/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scripts": {
"pretest:visualtest": "cd ../../ && VRT=1 npm run build:storybook",
"test:visualtest": "npm run backstopjs -- test",
"test:visualapprove": "npm run backstopjs -- approve",
"backstopjs": "./bin/backstop"
},
"dependencies": {
eugene-manuilov marked this conversation as resolved.
Show resolved Hide resolved
"@componentdriven/csf": "^0.0.2-alpha.0",
"lodash": "^4.17.21"
}
}
1 change: 1 addition & 0 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"jest": "^26.6.3",
"jest-puppeteer": "^6.0.1",
"jsdom": "^16.5.0",
"lodash": "^4.17.21",
"puppeteer": "^10.4.0"
}
}