You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Generate .svelte-kit/tsconfig.json and .svelte-kit/types
517
+
RUN bunx svelte-kit sync
518
+
RUN bunx playwright install
519
+
RUN bunx playwright install-deps
520
+
ENV CI=true
521
+
ENV PLAYWRIGHT_API_ORIGIN=http://localhost:8080/
522
+
ENV PLAYWRIGHT_APP_ORIGIN=http://localhost:8080/
523
+
ENV DISPLAY=
524
+
525
+
# Install docker compose - earthly can do this automatically, but it installs an older version
526
+
ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
527
+
RUN mkdir -p$DOCKER_CONFIG/cli-plugins
528
+
RUN curl -SL https://github.com/docker/compose/releases/download/v2.24.0-birthday.10/docker-compose-linux-x86_64 -o$DOCKER_CONFIG/cli-plugins/docker-compose
529
+
RUN chmod +x$DOCKER_CONFIG/cli-plugins/docker-compose
530
+
531
+
# Install zip to prepare test artifacts for export
532
+
RUN apt-get install -y zip
533
+
534
+
# ui-playwright-tests-e2e:
535
+
# FROM +ui-playwright-container
536
+
# ENV FELDERA_VERSION=latest
537
+
538
+
# TRY
539
+
# WITH DOCKER --load ghcr.io/feldera/pipeline-manager:latest=+pipeline-manager-container-cors-all \
540
+
# --compose ../docker-compose.yml \
541
+
# --service pipeline-manager
542
+
# # We zip artifacts regardless of test success or error, and then we complete the command preserving test's exit_code
543
+
# RUN sleep 10 && if bunx playwright test -c playwright-e2e.config.ts; then exit_code=0; else exit_code=$?; fi \
544
+
# && cd /dbsp \
545
+
# && zip -r playwright-report-e2e.zip playwright-report-e2e \
546
+
# && zip -r test-results-e2e.zip test-results-e2e \
547
+
# && exit $exit_code
548
+
# END
549
+
# FINALLY
550
+
# SAVE ARTIFACT --if-exists /dbsp/playwright-report-e2e.zip AS LOCAL ./playwright-artifacts/
551
+
# SAVE ARTIFACT --if-exists /dbsp/test-results-e2e.zip AS LOCAL ./playwright-artifacts/
552
+
# END
553
+
554
+
ui-playwright-tests-ct:
555
+
FROM+ui-playwright-container
556
+
ENV FELDERA_VERSION=latest
557
+
558
+
TRY
559
+
# We zip artifacts regardless of test success or error, and then we complete the command preserving test's exit_code
560
+
RUN if bunx playwright test -c playwright-ct.config.ts; then exit_code=0; else exit_code=$?; fi \
561
+
&& cd /dbsp/web-console \
562
+
&& zip -r playwright-report-ct.zip playwright-report-ct \
563
+
&& zip -r test-results-ct.zip test-results-ct \
564
+
&& exit $exit_code
565
+
FINALLY
566
+
SAVE ARTIFACT --if-exists /dbsp/web-console/playwright-report-ct.zip AS LOCAL ./playwright-artifacts/
567
+
SAVE ARTIFACT --if-exists /dbsp/web-console/test-results-ct.zip AS LOCAL ./playwright-artifacts/
Copy file name to clipboardExpand all lines: docs/contributors/ui-testing.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ Add environment variable `CI=true` when executing tests in CI setting.
8
8
9
9
### Running e2e tests
10
10
11
-
Run `yarn test-e2e` to execute all e2e tests on all supported platforms in background, or run `yarn test-e2e-ui` to open a UI to run tests interactively.
11
+
Run `bun run test-e2e` to execute all e2e tests on all supported platforms in background, or run `bun run test-e2e-ui` to open a UI to run tests interactively.
12
12
Tests should be executed against a running Pipeline Manager instance.
13
13
As an artificial limitation of scope, currently no services for Kafka, Debezium, Snowflake and other similar connector types are available for tests in the CI, so only HTTP connectors and API is available along with the UI itself.
14
14
15
15
### Running ct tests
16
16
17
-
Run `yarn test-ct` to execute all ct tests on all supported platforms in background, or run `yarn test-ct-ui` to open a UI to run tests interactively.
17
+
Run `bun run test-ct` to execute all ct tests on all supported platforms in background, or run `bun run test-ct-ui` to open a UI to run tests interactively.
18
18
Unit tests do not need Feldera instance to run because they run against individual ESM modules compiled on-demand for the test.
19
19
20
20
### Contributing tests
@@ -29,7 +29,7 @@ When committing new tests or updating screenshots for existing tests, `PLAYWRIGH
29
29
When testing locally, you need to manually clone `playwright-snapshots` and checkout the correct commit hash, e.g.:
30
30
31
31
```
32
-
cd web-console && yarn test-prepare
32
+
cd web-console && bun run test-prepare
33
33
```
34
34
OR
35
35
```
@@ -51,7 +51,7 @@ install Playwright on your host system: https://playwright.dev/docs/intro
51
51
52
52
Execute Playwright Codegen with:
53
53
```bash
54
-
yarn playwright codegen http://localhost:8080/
54
+
bunx playwright codegen http://localhost:8080/
55
55
```
56
56
57
57
Keep in mind that codegen is not designed to produce production-ready code,
0 commit comments