Skip to content

RI-8039 [E2E] 7.3 Settings -> Workbench Settings#5593

Open
pd-redis wants to merge 4 commits intomainfrom
e2e/RI-8039/workbench-settings
Open

RI-8039 [E2E] 7.3 Settings -> Workbench Settings#5593
pd-redis wants to merge 4 commits intomainfrom
e2e/RI-8039/workbench-settings

Conversation

@pd-redis
Copy link
Contributor

@pd-redis pd-redis commented Mar 4, 2026

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-settings


Closes #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 SettingsPage page object to use accordion heading locators, switch accordion-expanded checks to data-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.

@jit-ci
Copy link

jit-ci bot commented Mar 4, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

References: #RI-8039
Made-with: Cursor
@pd-redis pd-redis force-pushed the e2e/RI-8039/workbench-settings branch from 0bdc3f2 to 08bc78f Compare March 5, 2026 08:56
KrumTy
KrumTy previously approved these changes Mar 9, 2026
@KrumTy KrumTy dismissed their stale review March 9, 2026 13:20

to be re-reviewed once tests pass

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();
Copy link
Contributor

Choose a reason for hiding this comment

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

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();
Copy link
Contributor

Choose a reason for hiding this comment

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

and for that one too (I imagine we can set it to 2, and validate just a single command is visible)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.
Copy link

@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.

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');
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

…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.
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.

3 participants