Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions tests/e2e-playwright/TEST_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ The test plan is organized by feature area. Tests are grouped for parallel execu
### 7.3 Workbench Settings
| Status | Group | Test Case |
|--------|-------|-----------|
| 🔲 | main | Show editor cleanup switch |
| 🔲 | main | Show pipeline commands setting |
| | main | Show editor cleanup switch |
| | main | Show pipeline commands setting |
| 🔲 | main | Configure command timeout (N/A - per-database setting, not in settings page) |

### 7.4 Redis Cloud Settings
Expand Down
32 changes: 16 additions & 16 deletions tests/e2e-playwright/pages/settings/SettingsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export class SettingsPage extends BasePage {
// Page title
this.pageTitle = page.locator('[data-testid="settings-page-title"]').or(page.getByText('Settings').first());

// Accordion buttons
this.generalButton = page.getByRole('button', { name: 'General' });
this.privacyButton = page.getByRole('button', { name: 'Privacy' });
this.workbenchButton = page.getByRole('button', { name: 'Workbench' });
this.redisCloudButton = page.getByRole('button', { name: 'Redis Cloud', exact: true });
this.advancedButton = page.getByRole('button', { name: 'Advanced' });
// Accordion headings (clicking the heading label toggles the section)
this.generalButton = page.getByRole('heading', { name: 'General' });
this.privacyButton = page.getByRole('heading', { name: 'Privacy' });
this.workbenchButton = page.getByRole('heading', { name: 'Workbench' });
this.redisCloudButton = page.getByRole('heading', { name: 'Redis Cloud', exact: true });
this.advancedButton = page.getByRole('heading', { name: 'Advanced' });

// General settings
this.themeDropdown = page.getByRole('combobox', { name: /color theme/i });
Expand Down Expand Up @@ -148,32 +148,32 @@ export class SettingsPage extends BasePage {
* Check if General section is expanded
*/
async isGeneralExpanded(): Promise<boolean> {
const expanded = await this.generalButton.getAttribute('aria-expanded');
return expanded === 'true';
const state = await this.page.locator('[data-test-subj="accordion-appearance"]').getAttribute('data-state');
return state === 'open';
}

/**
* Check if Privacy section is expanded
*/
async isPrivacyExpanded(): Promise<boolean> {
const expanded = await this.privacyButton.getAttribute('aria-expanded');
return expanded === 'true';
const state = await this.page.locator('[data-test-subj="accordion-privacy-settings"]').getAttribute('data-state');
return state === 'open';
}

/**
* Check if Workbench section is expanded
*/
async isWorkbenchExpanded(): Promise<boolean> {
const expanded = await this.workbenchButton.getAttribute('aria-expanded');
return expanded === 'true';
const state = await this.page.locator('[data-test-subj="accordion-workbench-settings"]').getAttribute('data-state');
return state === 'open';
}

/**
* Check if Advanced section is expanded
*/
async isAdvancedExpanded(): Promise<boolean> {
const expanded = await this.advancedButton.getAttribute('aria-expanded');
return expanded === 'true';
const state = await this.page.locator('[data-test-subj="accordion-advanced-settings"]').getAttribute('data-state');
return state === 'open';
}

/**
Expand All @@ -188,8 +188,8 @@ export class SettingsPage extends BasePage {
* Check if Redis Cloud section is expanded
*/
async isRedisCloudExpanded(): Promise<boolean> {
const expanded = await this.redisCloudButton.getAttribute('aria-expanded');
return expanded === 'true';
const state = await this.page.locator('[data-test-subj="accordion-cloud-settings"]').getAttribute('data-state');
return state === 'open';
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { test, expect } from '../../../../fixtures/base';

/**
* Workbench Settings tests (TEST_PLAN.md: 7.3 Workbench Settings)
*
* Tests for the Workbench section on the Settings page.
* Verifies editor cleanup switch and pipeline commands setting are displayed.
*
* Note: "Configure command timeout" is N/A -- it's a per-database setting, not on the Settings page.
*/
test.describe('Workbench Settings', () => {
test.beforeEach(async ({ settingsPage }) => {
await settingsPage.goto();
await settingsPage.expandWorkbench();
});

test('should show editor cleanup switch', async ({ settingsPage }) => {
await expect(settingsPage.editorCleanupSwitch).toBeVisible();
});

test('should show pipeline commands setting', async ({ settingsPage }) => {
await expect(settingsPage.pipelineCommandsText).toBeVisible();
});
});