Skip to content

RI-8005 Add е2е tests for Browser - Keys List view#5851

Merged
valkirilov merged 5 commits into
mainfrom
e2e/RI-8005/key-list-view-tests
May 13, 2026
Merged

RI-8005 Add е2е tests for Browser - Keys List view#5851
valkirilov merged 5 commits into
mainfrom
e2e/RI-8005/key-list-view-tests

Conversation

@valkirilov
Copy link
Copy Markdown
Member

@valkirilov valkirilov commented May 5, 2026

What

Adds e2e test for the Browser - Keys List view, including list-view behavior, empty database behavior, and large-dataset list/tree scan flows.

Testing

Run the Docker containers with the test database instances

cd tests/e2e
docker-compose -f rte.docker-compose.yml up -d

And then you can run the tests

cd tests/e2e-playwright
npm run test:chromium -- tests/e2e-playwright/tests/main/browser/key-list
image image

Note

Low Risk
Low risk: changes are limited to Playwright E2E coverage and page-object locator/utility updates, with no production runtime impact. Main risk is potential test flakiness due to new selectors and localStorage-dependent state handling.

Overview
Adds a consolidated Playwright E2E suite for Browser → Key List view covering list rendering, type + exact-name filtering, refresh/auto-refresh, columns visibility, search-by-values toggle, single & bulk delete, plus dedicated scenarios for empty databases and large datasets (scroll + tree-view scan-more behavior).

Updates the KeyList page object to use more specific data-testid selectors and adds helpers for empty-state handling, footer count parsing, popover open/close, scrolling the virtualized grid, and more robust tree selection across persisted browserViewType state.

Marks the corresponding TEST_PLAN.md cases as implemented.

Reviewed by Cursor Bugbot for commit bd1f8c2. Bugbot is set up for automated code reviews on this repo. Configure here.

@valkirilov valkirilov requested a review from a team as a code owner May 5, 2026 13:16
@valkirilov valkirilov changed the title RI-8005 Add browser key list view E2E coverage RI-8005 Add browser key list view е2е tests May 5, 2026
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 5, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@valkirilov valkirilov changed the title RI-8005 Add browser key list view е2е tests RI-8005 Add е2е tests for Browser - Keys List view May 5, 2026
@valkirilov valkirilov self-assigned this May 5, 2026
Add focused Browser key-list E2E coverage with deterministic list-view flows, empty-state handling, and large-dataset checks, while keeping tree scan assertions separate.

References: #RI-8005
Co-authored-by: Cursor <cursoragent@cursor.com>
@valkirilov valkirilov force-pushed the e2e/RI-8005/key-list-view-tests branch from 284b113 to 9160f02 Compare May 8, 2026 12:03
clickKey was awaiting scrollIntoViewIfNeeded on a locator that does not match
in tree view, eating the test budget before the selectKeyInTree fallback
could run. Probe visibility first so the fallback fires immediately.

key-list-scan-more switched to tree view in the second test and never
restored, leaking the view preference to whichever spec landed in the
same worker next (e.g. decompression). Reset to list view in afterEach
so the suite leaves global state as it found it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switching the key list view writes browserViewType to localStorage, which is
shared by every spec in the same Electron instance. The new key-list specs all
force list view at the start of each test, so the value persisted into
vector-search specs running later — selectKeyInTree then waited for tree-view
test ids that don't exist in list view and timed out.

Clear browserViewType in afterEach for the three key-list specs so the next
spec gets the app's true default (Tree). Also probe the list-view table inside
selectKeyInTree and switch to tree view if a leak slips through from elsewhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread tests/e2e-playwright/pages/browser/components/KeyList.ts Outdated
Defined when the page object was first written but never called from any spec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5d9400a. Configure here.

Disable the auto-refresh switch at the end of the auto-refresh test so the
1s interval stops firing within the serial suite, and clear the persisted
autoRefreshRatekeys value in afterEach so it doesn't leak across specs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@valkirilov valkirilov merged commit efc6491 into main May 13, 2026
26 checks passed
@valkirilov valkirilov deleted the e2e/RI-8005/key-list-view-tests branch May 13, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants