RI-8005 Add е2е tests for Browser - Keys List view#5851
Merged
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
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>
284b113 to
9160f02
Compare
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>
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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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>
KrumTy
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
And then you can run the tests
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
KeyListpage object to use more specificdata-testidselectors and adds helpers for empty-state handling, footer count parsing, popover open/close, scrolling the virtualized grid, and more robust tree selection across persistedbrowserViewTypestate.Marks the corresponding
TEST_PLAN.mdcases as implemented.Reviewed by Cursor Bugbot for commit bd1f8c2. Bugbot is set up for automated code reviews on this repo. Configure here.