RI-8039 [E2E] 7.3 Settings -> Workbench Settings#5593
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
Outdated
Show resolved
Hide resolved
References: #RI-8039 Made-with: Cursor
0bdc3f2 to
08bc78f
Compare
The Section accordion from redis-ui renders headings, not buttons, for section labels. The collapse button has aria-label="Expand Section", not the section name. Updated isExpanded checks to use data-state on the accordion root element. Made-with: Cursor
| }); | ||
|
|
||
| test('should show editor cleanup switch', async ({ settingsPage }) => { | ||
| await expect(settingsPage.editorCleanupSwitch).toBeVisible(); |
There was a problem hiding this comment.
haven't tested it, but if it's easy, it makes sense to add a test that executes something in the workbench so we can validate the switch logic
| }); | ||
|
|
||
| test('should show pipeline commands setting', async ({ settingsPage }) => { | ||
| await expect(settingsPage.pipelineCommandsText).toBeVisible(); |
There was a problem hiding this comment.
and for that one too (I imagine we can set it to 2, and validate just a single command is visible)
There was a problem hiding this comment.
I don't think these should be tested here. The test must verify that you can change and save settings. How they affect the related feature, that should be tested as part of that feautre's tests
…nctionality - Added new locators for pipeline commands value, input, and apply button in SettingsPage. - Implemented methods to toggle editor cleanup and manage pipeline commands in SettingsPage. - Expanded tests to verify persistence of editor cleanup and pipeline commands settings after navigation.
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.
| this.pipelineCommandsText = page.getByText(/Commands in pipeline/i); | ||
| this.pipelineCommandsValue = page.getByTestId('pipeline-bunch-value'); | ||
| this.pipelineCommandsInput = page.getByTestId('pipeline-bunch-input'); | ||
| this.pipelineApplyButton = page.getByTestId('apply-btn'); |
There was a problem hiding this comment.
Non-scoped apply-btn locator matches multiple components
Low Severity
The pipelineApplyButton locator uses page.getByTestId('apply-btn'), which is a page-wide selector for a generic test ID shared by every InlineItemEditor instance in the app. The Advanced settings section also uses a SettingItem (which wraps InlineItemEditor with its own apply-btn). If both sections are ever expanded and one enters edit mode unexpectedly, this locator could match the wrong button. A scoped locator — e.g., chaining off the pipeline container — would be more resilient.
…functionality - Added tests to ensure that enabling editor cleanup clears the editor after command execution, while disabling it retains the command in the editor. - Updated documentation to reflect the new behavior of Workbench settings.


What
Add Playwright E2E tests for the Workbench Settings section (7.3) of the Settings page.
Tests verify that the editor cleanup switch and pipeline commands setting are displayed when expanding the Workbench section. The "Configure command timeout" test case is N/A (per-database setting, not on the Settings page).
Testing
Run:
npx playwright test tests/main/settings/workbench-settingsCloses #RI-8039
Made with Cursor
Note
Low Risk
Low risk: changes are confined to Playwright E2E test code and locator updates, with no production logic impacted. Main risk is potential flakiness if Settings accordion/test IDs change.
Overview
Adds Playwright E2E coverage for Settings → Workbench (7.3), verifying the editor cleanup toggle and pipeline commands setting are visible, persist after navigation, and that editor cleanup behavior affects Workbench command execution.
Updates the
SettingsPagepage object to use accordion heading locators, switch accordion-expanded checks todata-test-subj/data-state, and adds helpers/locators for editing and applying the pipeline commands value. Marks the corresponding test plan items as implemented.Written by Cursor Bugbot for commit cec6055. This will update automatically on new commits. Configure here.