import { test, expect } from '@playwright/test' test.describe('Traces Settings', () => { test.beforeEach(async ({ page }) => { await page.goto('/app/traces') // Wait for settings panel to load await expect(page.locator('text=Tracing is')).toBeVisible({ timeout: 10_000 }) }) test('settings panel is visible on page load', async ({ page }) => { await expect(page.locator('text=Tracing is')).toBeVisible() }) test('expand and collapse settings', async ({ page }) => { // The test server starts with tracing enabled, so the panel starts collapsed const settingsHeader = page.locator('button', { hasText: 'Tracing is' }) // Click to expand await settingsHeader.click() await expect(page.locator('text=Enable Tracing')).toBeVisible() // Click to collapse await settingsHeader.click() await expect(page.locator('text=Enable Tracing')).not.toBeVisible() }) test('toggle tracing on and off', async ({ page }) => { // Expand settings const settingsHeader = page.locator('button', { hasText: 'Tracing is' }) await settingsHeader.click() await expect(page.locator('text=Enable Tracing')).toBeVisible() // The Toggle component is a