Skip to content

Commit e0ce516

Browse files
committed
Revert "Enable Playwright unit tests (not component)"
This reverts commit 366b477.
1 parent ec56064 commit e0ce516

20 files changed

Lines changed: 36 additions & 335 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ RUN apt-get install -y \
3535
gcc clang libclang-dev python3-pip python3-plumbum \
3636
hub numactl openjdk-19-jre-headless maven
3737

38-
## Install nodejs and global packages (optional)
38+
## Install nodejs and global packages
3939
# - nodejs
4040
RUN mkdir -p /etc/apt/keyrings
4141
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
4242
ENV NODE_MAJOR=20
4343
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
4444
RUN apt update --fix-missing && apt install nodejs
4545
RUN npm install --global yarn
46-
RUN npm install --global @hey-api/openapi-ts
46+
RUN npm install --global openapi-typescript-codegen
4747

4848
## Install Redpanda rpk to enable preparing demos
4949

.devcontainer/postCreate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Install Playwright system dependencies
2-
cd ./web-console && bunx playwright install-deps
2+
cd ./web-console && yarn playwright install-deps
33
# Install Playwright browsers
4-
bunx playwright install
4+
npx playwright install

Earthfile

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ build-webui-deps:
129129

130130
COPY web-console/package.json ./web-console/
131131
COPY web-console/bun.lockb ./web-console/
132-
RUN cd web-console && bun run install-frozen
132+
RUN cd web-console && bun install
133133

134134
build-webui:
135135
FROM +build-webui-deps
@@ -498,75 +498,6 @@ integration-tests:
498498
exit $status
499499
END
500500

501-
ui-playwright-container:
502-
FROM +install-deps
503-
COPY web-console web-console
504-
# COPY web-console/playwright-ct.config.ts web-console
505-
COPY deploy/docker-compose.yml .
506-
COPY deploy/.env .
507-
508-
# Pull playwright-snapshots for visual regression testing
509-
# It was decided it's better to clone the snapshots repo during the build rather than have it as a submodule
510-
ARG PLAYWRIGHT_SNAPSHOTS_COMMIT
511-
RUN echo PLAYWRIGHT_SNAPSHOTS_COMMIT=$PLAYWRIGHT_SNAPSHOTS_COMMIT
512-
GIT CLONE --branch=$PLAYWRIGHT_SNAPSHOTS_COMMIT https://github.com/feldera/playwright-snapshots.git playwright-snapshots
513-
514-
WORKDIR web-console
515-
RUN bun run install-frozen
516-
# 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/
568-
END
569-
570501
benchmark:
571502
FROM +build-manager
572503
COPY demo/project_demo12-HopsworksTikTokRecSys/tiktok-gen demo/project_demo12-HopsworksTikTokRecSys/tiktok-gen
@@ -631,7 +562,6 @@ ci-tests:
631562
BUILD +openapi-checker
632563
BUILD +test-sql
633564
BUILD +integration-tests
634-
BUILD +ui-playwright-tests-ct
635565
# BUILD +test-docker-compose-stable
636566
# TODO: Temporarily disabled while we port the demo script
637567
# BUILD +test-snowflake
@@ -644,4 +574,3 @@ nightly-tests:
644574
BUILD +test-debezium-mysql
645575
BUILD +test-docker-compose
646576
BUILD +test-service-related
647-
# BUILD +ui-playwright-tests-e2e

crates/pipeline-manager/build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ fn main() {
5454
let asset_path: PathBuf = Path::new("../../web-console/").join(rel_build_dir);
5555
let mut resource_dir = NpmBuild::new("../../web-console")
5656
.executable("bun")
57-
.run("install-frozen")
57+
.install()
5858
.expect(
59-
"Could not run `bun install --frozen-lockfile`. Follow set-up instructions in web-console/README.md",
59+
"Could not run `bun install`. Follow set-up instructions in web-console/README.md",
6060
)
61-
.run("build --frozen-lockfile")
61+
.run("build")
6262
.expect("Could not run `bun run build`. Run it manually in web-console/ to debug.")
6363
.target(asset_path.clone())
6464
.to_resource_dir();

deploy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ RUN ln -s $HOME/.bun/bin/bun /usr/bin/bun
5656
# sveltekit
5757
COPY web-console/package.json web-console/
5858
COPY web-console/bun.lockb web-console/
59-
RUN cd web-console && bun run install-frozen
59+
RUN cd web-console && bun install
6060

6161
COPY web-console/static web-console/static
6262
COPY web-console/src web-console/src

docs/contributors/ui-testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Add environment variable `CI=true` when executing tests in CI setting.
88

99
### Running e2e tests
1010

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.
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.
1212
Tests should be executed against a running Pipeline Manager instance.
1313
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.
1414

1515
### Running ct tests
1616

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.
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.
1818
Unit tests do not need Feldera instance to run because they run against individual ESM modules compiled on-demand for the test.
1919

2020
### Contributing tests
@@ -29,7 +29,7 @@ When committing new tests or updating screenshots for existing tests, `PLAYWRIGH
2929
When testing locally, you need to manually clone `playwright-snapshots` and checkout the correct commit hash, e.g.:
3030

3131
```
32-
cd web-console && bun run test-prepare
32+
cd web-console && yarn test-prepare
3333
```
3434
OR
3535
```
@@ -51,7 +51,7 @@ install Playwright on your host system: https://playwright.dev/docs/intro
5151

5252
Execute Playwright Codegen with:
5353
```bash
54-
bunx playwright codegen http://localhost:8080/
54+
yarn playwright codegen http://localhost:8080/
5555
```
5656

5757
Keep in mind that codegen is not designed to produce production-ready code,

web-console/.gitignore

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
# dependencies
21
/node_modules
32

4-
# build
3+
# Output
54
.output
65
.vercel
76
/.svelte-kit
87
/build
9-
/pipeline-manager-*
108

119
# OS
1210
.DS_Store
1311
Thumbs.db
1412

15-
# misc
16-
*.pem
17-
18-
# debug
19-
npm-debug.log*
20-
yarn-debug.log*
21-
yarn-error.log*
22-
23-
# local env files
13+
# Env
2414
.env
2515
.env.*
2616
!.env.example
@@ -30,16 +20,5 @@ yarn-error.log*
3020
vite.config.js.timestamp-*
3121
vite.config.ts.timestamp-*
3222

33-
# TypeScript
34-
*.tsbuildinfo
35-
36-
# Playwright
37-
/playwright-report-ct/
38-
/test-results-ct/
39-
/blob-report-ct/
40-
/playwright-report-e2e/
41-
/test-results-e2e/
42-
/blob-report-e2e/
43-
4423
# Pipeline Manager tmp build folder
4524
/pipeline-manager-*/

web-console/.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
package-lock.json
33
pnpm-lock.yaml
44
yarn.lock
5-
bun.lockb

web-console/bun.lockb

4.46 KB
Binary file not shown.

web-console/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
"test-ct": "DISPLAY= bun playwright test -c playwright-ct.config.ts",
1919
"test-ct-ui": "DISPLAY= bun playwright test -c playwright-ct.config.ts --ui-host=0.0.0.0",
2020
"test-report": "bun playwright show-report",
21-
"test-prepare": "git clone --depth 1 https://github.com/feldera/playwright-snapshots.git",
22-
"install-frozen": "bun install --frozen-lockfile"
21+
"test-prepare": "git clone --depth 1 https://github.com/feldera/playwright-snapshots.git"
2322
},
2423
"devDependencies": {
24+
"@auth/sveltekit": "^1.4.1",
2525
"@axa-fr/oidc-client": "^7.22.21",
2626
"@fontsource-variable/public-sans": "^5.0.19",
2727
"@fortawesome/fontawesome-free": "^6.6.0",
2828
"@hey-api/client-fetch": "0.1.10",
2929
"@hey-api/openapi-ts": "^0.47.2",
30-
"@playwright/experimental-ct-svelte": "^1.46.1",
31-
"@playwright/test": "^1.46.1",
30+
"@playwright/test": "^1.45.2",
3231
"@poppanator/sveltekit-svg": "^5.0.0-svelte5.5",
3332
"@revolist/svelte-datagrid": "^4.9.9",
33+
"@rich_harris/svelte-split-pane": "^1.1.3",
3434
"@skeletonlabs/skeleton": "^3.0.0-next.2",
3535
"@skeletonlabs/skeleton-svelte": "^1.0.0-next.4",
3636
"@square/svelte-store": "^1.0.18",
@@ -59,12 +59,14 @@
5959
"globals": "^15.8.0",
6060
"monaco-editor": "^0.49.0",
6161
"new-github-issue-url": "^1.0.0",
62+
"oidc-client-ts-lumeris": "^1.0.0",
6263
"paneforge": "^0.0.5",
6364
"postcss": "^8.4.39",
6465
"prettier": "^3.3.3",
6566
"prettier-plugin-svelte": "^3.2.6",
6667
"prettier-plugin-tailwindcss": "^0.6.5",
6768
"runed": "^0.13.0",
69+
"sk-oidc-oauth": "^1.2.0",
6870
"sort-on": "^6.0.0",
6971
"svelte": "5.0.0-next.166",
7072
"svelte-attr": "^0.0.2",
@@ -82,12 +84,14 @@
8284
"typescript": "^5.5.4",
8385
"typescript-eslint": "^8.0.0-alpha.51",
8486
"valibot": "^0.36.0",
87+
"virtua": "^0.33.4",
8588
"vite": "^5.3.4",
8689
"worker-timers": "^8.0.4"
8790
},
8891
"type": "module",
8992
"trustedDependencies": [
9093
"@axa-fr/oidc-client",
94+
"sk-oidc-oauth",
9195
"svelte-preprocess"
9296
]
9397
}

0 commit comments

Comments
 (0)