first commit
This commit is contained in:
21
tests/e2e/features/mcp-settings/mcp-settings.spec.ts
Normal file
21
tests/e2e/features/mcp-settings/mcp-settings.spec.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { expect, test } from '../../core/fixtures/base.fixture'
|
||||
|
||||
test.describe('MCP Settings', () => {
|
||||
test.beforeEach(async ({ mcpSettingsPage }) => {
|
||||
await mcpSettingsPage.goto()
|
||||
})
|
||||
|
||||
test('should display MCP settings page', async ({ mcpSettingsPage }) => {
|
||||
await expect(mcpSettingsPage.mcpSettingsView).toBeVisible()
|
||||
})
|
||||
|
||||
test('should display MCP settings form fields', async ({ mcpSettingsPage }) => {
|
||||
await expect(mcpSettingsPage.page.getByLabel('Max Agent Depth')).toBeVisible()
|
||||
await expect(mcpSettingsPage.page.getByLabel('Tool Execution Timeout (seconds)')).toBeVisible()
|
||||
})
|
||||
|
||||
test('should have save button disabled when no changes', async ({ mcpSettingsPage }) => {
|
||||
await expect(mcpSettingsPage.saveBtn).toBeVisible()
|
||||
await expect(mcpSettingsPage.saveBtn).toBeDisabled()
|
||||
})
|
||||
})
|
||||
24
tests/e2e/features/mcp-settings/pages/mcp-settings.page.ts
Normal file
24
tests/e2e/features/mcp-settings/pages/mcp-settings.page.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Locator, Page } from '@playwright/test'
|
||||
import { BasePage } from '../../../core/pages/base.page'
|
||||
import { waitForNetworkIdle } from '../../../core/utils/test-helpers'
|
||||
|
||||
export class MCPSettingsPage extends BasePage {
|
||||
readonly mcpSettingsView: Locator
|
||||
readonly saveBtn: Locator
|
||||
readonly maxAgentDepthInput: Locator
|
||||
readonly toolTimeoutInput: Locator
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page)
|
||||
|
||||
this.mcpSettingsView = page.getByTestId('mcp-settings-view')
|
||||
this.saveBtn = page.getByTestId('mcp-settings-save-btn')
|
||||
this.maxAgentDepthInput = page.getByTestId('mcp-agent-depth-input').or(page.locator('#mcp-agent-depth'))
|
||||
this.toolTimeoutInput = page.getByTestId('mcp-tool-timeout-input').or(page.locator('#mcp-tool-execution-timeout'))
|
||||
}
|
||||
|
||||
async goto(): Promise<void> {
|
||||
await this.page.goto('/workspace/mcp-settings')
|
||||
await waitForNetworkIdle(this.page)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user