Skip to content

Commit

Permalink
test: Fix stale e2e server image locally (#454)
Browse files Browse the repository at this point in the history
Fixed an issue that caused the server edge image to be stale when
running locally
Added a few lines from web-client-ui to install fonts in the Dockerfile
just in case they're needed
Generated new snapshots from fira font change
Removed a package.json script that didn't work
Removed an env variable we weren't actually using for e2e tests

---------

Co-authored-by: Don <dsmmcken@gmail.com>
  • Loading branch information
mattrunyon and dsmmcken committed May 8, 2024
1 parent f342dad commit 19d6cd6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"test:ci": "run-p test:ci:*",
"test:ci:unit": "jest --config jest.config.unit.cjs --ci --cacheDirectory $PWD/.jest-cache",
"test:ci:lint": "jest --config jest.config.lint.cjs --ci --cacheDirectory $PWD/.jest-cache",
"e2e": "playwright run",
"e2e:docker": "DEEPHAVEN_PORT=10001 ./tools/run_docker.sh e2e-tests",
"e2e:docker": "./tools/run_docker.sh e2e-tests",
"e2e:update-snapshots": "./tools/run_docker.sh update-snapshots",
"update-dh-packages": "lerna run --concurrency 1 update-dh-packages"
},
Expand Down
10 changes: 10 additions & 0 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
FROM mcr.microsoft.com/playwright:v1.41.2-jammy AS playwright
WORKDIR /work/

# Update packages list and install some build tools.
# Installing fonts-dejavu-core so we have some common fonts with the GH actions
# runner that can be used to render unicode fonts. See web-client-ui README for more info.
RUN set -eux; \
apt-get update; \
apt-get install build-essential --yes; \
apt-get install fonts-dejavu-core --yes;

RUN fc-list : family;

RUN npm install @playwright/test@1.41.2
COPY playwright.config.ts .
COPY playwright-docker.config.ts .
4 changes: 3 additions & 1 deletion tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
build:
context: ../
dockerfile: ./Dockerfile
pull: true # We need to always pull the latest server image used in the Dockerfile
expose:
- 10000
volumes:
Expand All @@ -18,14 +19,15 @@ services:
build:
context: ../
dockerfile: ./tests/Dockerfile
pull: true # We only use FROM with a pinned version here, but adding this just in case that changes in the future
ports:
- '9323:9323'
ipc: host
volumes:
- ../tests:/work/tests
- ../test-results:/work/test-results
- ../playwright-report:/work/playwright-report
entrypoint: "npx playwright test --config=playwright-docker.config.ts"
entrypoint: 'npx playwright test --config=playwright-docker.config.ts'
depends_on:
deephaven-plugins:
condition: service_healthy
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/express.spec.ts-snapshots/Express-loads-1-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/ui.spec.ts-snapshots/UI-loads-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 19d6cd6

Please sign in to comment.