Skip to content

[RI-6570] Playwright E2E tests #4615

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

Merged
merged 134 commits into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
2ed9c1d
initial setup
Mar 11, 2025
edbb6b8
documentation and some additional scripts
Mar 11, 2025
a71c200
move dependencies
Mar 12, 2025
4aeb934
test commented
Mar 12, 2025
3ad1cf6
faker + common +consts added
Mar 14, 2025
7dbb436
local env create
Mar 14, 2025
d8b55fb
browser starting to local url
Mar 14, 2025
298a4fb
more POs
Mar 14, 2025
4e16409
database created
Mar 15, 2025
1865312
clicking on a db
Mar 15, 2025
732bf1b
created types and extracting
Mar 15, 2025
9d9968f
wip
Mar 15, 2025
23af1c9
wip
Mar 15, 2025
a7520b5
wip
Mar 15, 2025
4d8111b
wip
Mar 15, 2025
b9c814d
wip - add key working
Mar 15, 2025
9f9eef5
wip - additional methods
Mar 15, 2025
0c7e131
added selector module
Mar 16, 2025
43d6a27
more selectors added
Mar 16, 2025
e838356
pass the notification check
Mar 16, 2025
c1b75e8
full test passing db delete call failing
Mar 16, 2025
cc51edc
additional generative methods
Mar 16, 2025
f806ce3
wip delete api
Mar 16, 2025
f8a7603
change url to original
Mar 16, 2025
ec2bca4
test passing again with debug axios impl
Mar 16, 2025
a841538
all parts passing with debug files
Mar 16, 2025
a500331
simplify http client
Mar 16, 2025
a92c5a7
Web POC done
Mar 16, 2025
1b58777
project set up for electron tests
Mar 16, 2025
79f17b1
small changes in formating and wait
Mar 16, 2025
de6cac1
app starting from unpacked app image
Mar 16, 2025
1bb66ef
more setup for electron
Mar 17, 2025
c052e8f
changes around agreement pop up
Mar 17, 2025
78ef435
app info to insights
Mar 17, 2025
8ecc558
moved utils and db scripts
Mar 17, 2025
475ed53
closing app
Mar 17, 2025
c97df52
more page objects and methods
Mar 17, 2025
b5fc565
more pages and changes
Mar 17, 2025
9de6c03
wip PO
Mar 17, 2025
c318126
wip PO
Mar 17, 2025
9063857
wip
Mar 17, 2025
7ee6588
runninf a tat better
Mar 18, 2025
072b20e
web test back working
Mar 18, 2025
35fe22a
sql lite issues
Mar 18, 2025
8171b5d
sql lite issues wip
Mar 19, 2025
a7799fb
some env creation improvements
Mar 19, 2025
26e3649
update control Numbers passing - fix other requests next
Mar 19, 2025
3b56db4
small additions
Mar 20, 2025
fc9e9b6
wip
Mar 20, 2025
4b9041a
small typo
Mar 20, 2025
8d04d2e
DB Created
Mar 20, 2025
f68bb7d
Changes in
Mar 20, 2025
112d8d7
test passing
Mar 20, 2025
ae8a376
cleanup
Mar 20, 2025
dbc6f1f
state messing up web test
Mar 20, 2025
c0ae0be
cleanup + docs
Mar 20, 2025
93239b8
cleanup
Mar 20, 2025
9ed5d32
cleanup + docks
Mar 20, 2025
0408dd2
docs and small fix
Mar 20, 2025
170302d
Merge branch 'refs/heads/main' into RI-6570-PlayWright
Mar 20, 2025
761eb72
docs and small fix
Mar 20, 2025
30b5825
docs and test improvements
Mar 20, 2025
da230df
docs
Mar 20, 2025
25bd846
upd dock
Mar 21, 2025
5c2c8b6
upd dock
Mar 21, 2025
5b49ce3
upd dock
Mar 21, 2025
f3c2f81
formating and spelling changes
Mar 21, 2025
76f5e46
docs
Mar 21, 2025
bf162d0
changes around test data
Mar 27, 2025
42a88c4
Merge branch 'main' into feature/RI-6570/PlayWright
KrumTy May 8, 2025
4577dac
Merge branch 'main' into feature/RI-6570/PlayWright
KrumTy May 13, 2025
a6c99da
update config
KrumTy May 14, 2025
21d3e7b
Merge branch 'main' into feature/RI-6570/PlayWright
KrumTy May 30, 2025
88741db
revert e2e/ folder changes
KrumTy Jun 4, 2025
e8f5686
refactor fixture
KrumTy Jun 4, 2025
018be1e
resolve docker environments
KrumTy Jun 4, 2025
3d0573e
update environments
KrumTy Jun 4, 2025
9f9eb14
update client config
KrumTy Jun 4, 2025
1b30005
update configs
KrumTy Jun 4, 2025
9634d67
remove differences
KrumTy Jun 4, 2025
3f93bb8
update workflows
KrumTy Jun 5, 2025
57b2186
update e2e workflow
KrumTy Jun 5, 2025
885a87e
update workflow
KrumTy Jun 5, 2025
1d3679f
update playwright
KrumTy Jun 5, 2025
984ef6a
update playwright tests and fixtures
KrumTy Jun 5, 2025
e1b3aa8
use headless mode for testing
KrumTy Jun 6, 2025
286edcf
update workflows
KrumTy Jun 6, 2025
14daebe
update playwright config
KrumTy Jun 6, 2025
1e3c0d3
update tests workflow
KrumTy Jun 6, 2025
9e8b43c
Revert "update tests workflow"
KrumTy Jun 6, 2025
5a3905d
add axios for playwright
KrumTy Jun 6, 2025
832e099
single worker for electron tests
KrumTy Jun 6, 2025
839c79c
debug pipeline
KrumTy Jun 6, 2025
01961f8
update workflow
KrumTy Jun 6, 2025
5d99e99
update workflow
KrumTy Jun 6, 2025
3c60dfc
fix multi test runs
KrumTy Jun 6, 2025
46874dc
update workflows
KrumTy Jun 6, 2025
101de1d
minor refactor
KrumTy Jun 6, 2025
671be83
update workflow
KrumTy Jun 6, 2025
cc327cb
update workflow
KrumTy Jun 6, 2025
71f5237
update tests cleanup
KrumTy Jun 6, 2025
b9e9821
update upload path
KrumTy Jun 6, 2025
3cd028a
update artifacts path
KrumTy Jun 6, 2025
8fb4e8c
update image build script
KrumTy Jun 6, 2025
786bcc0
update docker compose
KrumTy Jun 6, 2025
3e46119
update scripts
KrumTy Jun 6, 2025
98f00e1
disable sqlite edit
KrumTy Jun 6, 2025
b4cf555
debug api
KrumTy Jun 6, 2025
ef70cf2
update workflow
KrumTy Jun 6, 2025
5275b78
debug post request
KrumTy Jun 7, 2025
9162a3e
Merge remote-tracking branch 'origin/main' into feature/RI-6570/PlayW…
KrumTy Jun 7, 2025
92da152
update db insert
KrumTy Jun 7, 2025
1cf220d
update hosts
KrumTy Jun 7, 2025
527666f
cleanup logs
KrumTy Jun 7, 2025
bae248e
extract e2e workflow
KrumTy Jun 7, 2025
3d53045
add steps for e2e job
KrumTy Jun 7, 2025
f3ec924
add temporal push trigger for e2e
KrumTy Jun 7, 2025
69444e8
add TODO comment
KrumTy Jun 7, 2025
ff0f112
adjust e2e tests workflow trigger
KrumTy Jun 7, 2025
4884d4b
revert temp changes
KrumTy Jun 7, 2025
0f2d513
update workflows
KrumTy Jun 7, 2025
13b17af
refactor playwright e2e tests
KrumTy Jun 8, 2025
72e113c
use exact match for button
KrumTy Jun 8, 2025
dda1c48
update README.md
KrumTy Jun 9, 2025
45a0fc6
update README.md
KrumTy Jun 9, 2025
1ffaa09
update README.md
KrumTy Jun 9, 2025
2a60c44
revert tests/e2e change
KrumTy Jun 9, 2025
1caea1a
update imports
KrumTy Jun 9, 2025
4d6e203
Detach E2E workflows (#4616)
KrumTy Jun 9, 2025
dadc265
update workflows
KrumTy Jun 10, 2025
76c07b4
Merge branch 'main' into feature/RI-6570/PlayWright
KrumTy Jul 9, 2025
c01b123
Update README.md
valkirilov Jul 10, 2025
16a940a
feat: configure code coverage reports for the playwright e2e tests (#…
valkirilov Jul 21, 2025
df9ac58
restructure readme
pawelangelow Jul 23, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
id: findPr

- name: Post or Update Coverage Summary Comment
if: ${{ steps.findPr.outputs.number != '' }}
uses: actions/github-script@v7
with:
script: |
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/tests-e2e-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: ✅ E2E Approve

on:
pull_request_review:
types: [submitted]

jobs:
e2e-approve:
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
steps:
- name: Add "e2e-approved" Label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: e2e-approved
2 changes: 1 addition & 1 deletion .github/workflows/tests-e2e-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
TEST_BIG_DB_DUMP=$TEST_BIG_DB_DUMP \
RI_SERVER_TLS_CERT="$RI_SERVER_TLS_CERT" \
RI_SERVER_TLS_KEY="$RI_SERVER_TLS_KEY" \
docker compose \
docker compose --profile e2e \
-f tests/e2e/rte.docker-compose.yml \
-f tests/e2e/docker.web.docker-compose.yml \
up --abort-on-container-exit --force-recreate
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/tests-e2e-playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Playwright E2E Tests
on:
workflow_call:
inputs:
debug:
description: SSH Debug
default: false
type: boolean
env:
E2E_CLOUD_DATABASE_USERNAME: ${{ secrets.E2E_CLOUD_DATABASE_USERNAME }}
E2E_CLOUD_DATABASE_PASSWORD: ${{ secrets.E2E_CLOUD_DATABASE_PASSWORD }}
E2E_CLOUD_API_ACCESS_KEY: ${{ secrets.E2E_CLOUD_API_ACCESS_KEY }}
E2E_CLOUD_DATABASE_HOST: ${{ secrets.E2E_CLOUD_DATABASE_HOST }}
E2E_CLOUD_DATABASE_PORT: ${{ secrets.E2E_CLOUD_DATABASE_PORT }}
E2E_CLOUD_DATABASE_NAME: ${{ secrets.E2E_CLOUD_DATABASE_NAME }}
E2E_CLOUD_API_SECRET_KEY: ${{ secrets.E2E_CLOUD_API_SECRET_KEY }}

E2E_RI_ENCRYPTION_KEY: ${{ secrets.E2E_RI_ENCRYPTION_KEY }}
RI_ENCRYPTION_KEY: ${{ secrets.RI_ENCRYPTION_KEY }}
RI_SERVER_TLS_CERT: ${{ secrets.RI_SERVER_TLS_CERT }}
RI_SERVER_TLS_KEY: ${{ secrets.RI_SERVER_TLS_KEY }}
TEST_BIG_DB_DUMP: ${{ secrets.TEST_BIG_DB_DUMP }}
E2E_VOLUME_PATH: '/usr/src/app'

jobs:
e2e-playwright-chromium-docker:
name: E2E Playwright Chromium Docker Build Tests
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Install dependencies for Playwright tests
uses: ./.github/actions/install-deps
with:
dir-path: './tests/playwright'

- name: Install Playwright Browsers
working-directory: ./tests/playwright
run: yarn playwright install --with-deps

- name: Download Docker Artifacts
uses: actions/download-artifact@v4
with:
name: docker-builds
path: ./release

- name: Load built docker image from workspace
run: |
docker image load -i ./release/docker/docker-linux-alpine.amd64.tar

- name: Set up redis test environments
run: |
TEST_BIG_DB_DUMP=$TEST_BIG_DB_DUMP \
docker compose -p e2e-rte \
-f tests/e2e/rte.docker-compose.yml \
up --detach --force-recreate

- name: Set up RI docker image
run: |
E2E_RI_ENCRYPTION_KEY="$E2E_RI_ENCRYPTION_KEY" \
RI_SERVER_TLS_CERT="$RI_SERVER_TLS_CERT" \
RI_SERVER_TLS_KEY="$RI_SERVER_TLS_KEY" \
docker compose -p e2e-ri-docker \
-f tests/e2e/docker.web.docker-compose.yml \
up --detach --force-recreate
sleep 30

- name: Run Playwright tests
timeout-minutes: 80
working-directory: ./tests/playwright
if: ${{ !cancelled() }}
run: |
yarn test:chromium:docker

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: |
./tests/playwright/test-results
./tests/playwright/allure-results
./tests/playwright/playwright-report
retention-days: 10

- name: Clean up redis test environments
if: always()
run: |
docker compose -p e2e-rte \
-f tests/e2e/rte.docker-compose.yml \
down --volumes --remove-orphans

- name: Clean up RI docker image
if: always()
run: |
docker compose -p e2e-ri-docker \
-f tests/e2e/docker.web.docker-compose.yml \
down --volumes --remove-orphans
83 changes: 83 additions & 0 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: ✅ E2E Tests

on:
pull_request:
types: [labeled]

workflow_dispatch:
inputs:
debug:
description: Enable SSH Debug (IT and E2E)
default: false
type: boolean

# Cancel a previous run workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-e2e
cancel-in-progress: true

jobs:
# E2E Approve
e2e-approve:
runs-on: ubuntu-latest
if: github.event.action == 'labeled' && contains(github.event.label.name, 'e2e-approved') || github.event_name == 'workflow_dispatch'
name: Approve E2E tests
steps:
- name: Add "e2e-approved" Label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: e2e-approved

# E2E Docker
build-docker:
uses: ./.github/workflows/pipeline-build-docker.yml
needs: e2e-approve
secrets: inherit
with:
debug: ${{ inputs.debug || false }}
for_e2e_tests: true

e2e-docker-tests:
needs: build-docker
uses: ./.github/workflows/tests-e2e-docker.yml
secrets: inherit
with:
debug: ${{ inputs.debug || false }}

tests-e2e-playwright:
needs: build-docker
uses: ./.github/workflows/tests-e2e-playwright.yml
secrets: inherit
with:
debug: ${{ inputs.debug || false }}

# E2E AppImage
build-appimage:
uses: ./.github/workflows/pipeline-build-linux.yml
needs: e2e-approve
secrets: inherit
with:
target: build_linux_appimage_x64
debug: ${{ inputs.debug || false }}

e2e-appimage-tests:
needs: build-appimage
uses: ./.github/workflows/tests-e2e-appimage.yml
secrets: inherit
with:
debug: ${{ inputs.debug || false }}

clean:
uses: ./.github/workflows/clean-deployments.yml
if: always()
needs: [e2e-docker-tests, e2e-appimage-tests, tests-e2e-playwright]

# Remove artifacts from github actions
remove-artifacts:
name: Remove artifacts
needs: [e2e-docker-tests, e2e-appimage-tests, tests-e2e-playwright]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove all artifacts
uses: ./.github/actions/remove-artifacts
70 changes: 3 additions & 67 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@ on:
- 'fe/**'
- 'be/**'
- 'fe-be/**'
- 'e2e/**'
- 'feature/**'
- 'bugfix/**'
- 'ric/**'

workflow_dispatch:
inputs:
group_tests:
description: Run group of tests
default: 'all'
type: choice
options:
- all
- without_e2e
- only_e2e

redis_client:
description: Library to use for redis connection
default: 'ioredis'
Expand All @@ -42,10 +32,6 @@ on:

workflow_call:
inputs:
group_tests:
description: Run group of tests
type: string
default: 'without_e2e'
short_rte_list:
description: Use short rte list
type: boolean
Expand All @@ -71,7 +57,6 @@ jobs:
frontend: ${{ steps.filter.outputs.frontend }}
backend: ${{ steps.filter.outputs.backend }}
desktop: ${{ steps.filter.outputs.desktop }}
e2e: ${{ steps.filter.outputs.e2e }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3.0.2
Expand All @@ -85,12 +70,10 @@ jobs:
- 'redisinsight/api/**'
desktop:
- 'redisinsight/desktop/**'
e2e:
- 'tests/e2e/**'

frontend-tests:
needs: changes
if: inputs.group_tests == 'all' || inputs.group_tests == 'without_e2e' || startsWith(github.ref_name, 'fe/') || startsWith(github.ref_name, 'fe-be/') || startsWith(github.ref_name, 'feature/') || startsWith(github.ref_name, 'bugfix/') || startsWith(github.ref_name, 'ric/')
if: startsWith(github.ref_name, 'fe/') || startsWith(github.ref_name, 'fe-be/') || startsWith(github.ref_name, 'feature/') || startsWith(github.ref_name, 'bugfix/') || startsWith(github.ref_name, 'ric/')
uses: ./.github/workflows/tests-frontend.yml
secrets: inherit

Expand All @@ -104,7 +87,7 @@ jobs:

backend-tests:
needs: changes
if: inputs.group_tests == 'all' || inputs.group_tests == 'without_e2e' || startsWith(github.ref_name, 'be/') || startsWith(github.ref_name, 'fe-be/') || startsWith(github.ref_name, 'feature/') || startsWith(github.ref_name, 'bugfix/') || startsWith(github.ref_name, 'ric/')
if: startsWith(github.ref_name, 'be/') || startsWith(github.ref_name, 'fe-be/') || startsWith(github.ref_name, 'feature/') || startsWith(github.ref_name, 'bugfix/') || startsWith(github.ref_name, 'ric/')
uses: ./.github/workflows/tests-backend.yml
secrets: inherit

Expand All @@ -118,7 +101,7 @@ jobs:

integration-tests:
needs: changes
if: inputs.group_tests == 'all' || inputs.group_tests == 'without_e2e' || startsWith(github.ref_name, 'be/') || startsWith(github.ref_name, 'fe-be/') || startsWith(github.ref_name, 'feature/') || startsWith(github.ref_name, 'bugfix/') || startsWith(github.ref_name, 'ric/')
if: startsWith(github.ref_name, 'be/') || startsWith(github.ref_name, 'fe-be/') || startsWith(github.ref_name, 'feature/') || startsWith(github.ref_name, 'bugfix/') || startsWith(github.ref_name, 'ric/')
uses: ./.github/workflows/tests-integration.yml
secrets: inherit
with:
Expand All @@ -134,49 +117,6 @@ jobs:
resource_name: integration-coverage
type: integration

# # E2E Approve
e2e-approve:
runs-on: ubuntu-latest
needs: changes
if: inputs.group_tests == 'all' || inputs.group_tests == 'only_e2e' || startsWith(github.ref_name, 'e2e/')
timeout-minutes: 60
environment: ${{ startsWith(github.ref_name, 'e2e/') && 'e2e-approve' || 'staging' }}
name: Approve E2E tests
steps:
- uses: actions/checkout@v4

# E2E Docker
build-docker:
uses: ./.github/workflows/pipeline-build-docker.yml
needs: e2e-approve
secrets: inherit
with:
debug: ${{ inputs.debug || false }}
for_e2e_tests: true

e2e-docker-tests:
needs: build-docker
uses: ./.github/workflows/tests-e2e-docker.yml
secrets: inherit
with:
debug: ${{ inputs.debug || false }}

# E2E AppImage
build-appimage:
uses: ./.github/workflows/pipeline-build-linux.yml
needs: e2e-approve
secrets: inherit
with:
target: build_linux_appimage_x64
debug: ${{ inputs.debug || false }}

e2e-appimage-tests:
needs: build-appimage
uses: ./.github/workflows/tests-e2e-appimage.yml
secrets: inherit
with:
debug: ${{ inputs.debug || false }}

clean:
uses: ./.github/workflows/clean-deployments.yml
if: always()
Expand All @@ -185,8 +125,6 @@ jobs:
frontend-tests,
backend-tests,
integration-tests,
e2e-docker-tests,
e2e-appimage-tests,
]

# Remove artifacts from github actions
Expand All @@ -197,8 +135,6 @@ jobs:
frontend-tests,
backend-tests,
integration-tests,
e2e-docker-tests,
e2e-appimage-tests,
]
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"private": true,
"scripts": {
"dev:ui": "cross-env yarn --cwd redisinsight/ui dev",
"dev:ui:coverage": "cross-env COLLECT_COVERAGE=true yarn --cwd redisinsight/ui dev",
"dev:api": "cross-env yarn --cwd redisinsight/api start:dev",
"dev:electron:ui": "cross-env RI_APP_PORT=8080 RI_APP_TYPE=ELECTRON NODE_ENV=development yarn --cwd redisinsight/ui dev",
"dev:electron:api": "cross-env RI_APP_PORT=5540 RI_APP_TYPE=ELECTRON NODE_ENV=development USE_TCP_CLOUD_AUTH=true yarn --cwd redisinsight/api start:dev",
Expand Down Expand Up @@ -222,6 +223,7 @@
"vite-plugin-ejs": "^1.7.0",
"vite-plugin-electron": "^0.28.6",
"vite-plugin-electron-renderer": "^0.14.5",
"vite-plugin-istanbul": "^7.1.0",
"vite-plugin-react-click-to-component": "^3.0.0",
"vite-plugin-svgr": "^4.2.0",
"webpack": "^5.95.0",
Expand Down
Loading
Loading