feat: implement comments and activity panel in workspace
- Added CommentsPanel component for managing comments on documents. - Integrated comment creation, deletion, and resolution functionalities. - Implemented activity tracking for document interactions. - Enhanced SketchPage with editing and saving capabilities. - Introduced template management API endpoints for creating, sharing, and deleting templates. - Added runtime validation report for frontend and backend. - Created GettingStartedPanel for user onboarding with template options. - Implemented Playwright E2E tests for accessibility and export functionality.
This commit is contained in:
parent
6e354ba041
commit
809235e962
41 changed files with 2840 additions and 285 deletions
13
frontend/e2e/helpers.ts
Normal file
13
frontend/e2e/helpers.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { expect, type Page } from '@playwright/test'
|
||||
|
||||
export async function login(page: Page) {
|
||||
const email = process.env.E2E_USERNAME
|
||||
const password = process.env.E2E_PASSWORD
|
||||
if (!email || !password) return false
|
||||
await page.goto('/login')
|
||||
await page.getByLabel(/email|username/i).first().fill(email)
|
||||
await page.getByLabel(/password/i).fill(password)
|
||||
await page.getByRole('button', { name: /sign in|log in/i }).click()
|
||||
await expect(page).toHaveURL(/dashboard|workspace/, { timeout: 15_000 })
|
||||
return true
|
||||
}
|
||||
11
frontend/e2e/phase8-accessibility.spec.ts
Normal file
11
frontend/e2e/phase8-accessibility.spec.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { test, expect } from '@playwright/test'
|
||||
import { login } from './helpers'
|
||||
|
||||
test('workspace controls expose accessible names and keyboard navigation', async ({ page }) => {
|
||||
test.skip(!process.env.E2E_USERNAME || !process.env.E2E_PASSWORD, 'Set E2E_USERNAME and E2E_PASSWORD')
|
||||
expect(await login(page)).toBeTruthy()
|
||||
await expect(page.getByRole('button', { name: /search/i }).first()).toBeVisible()
|
||||
await expect(page.getByRole('button', { name: /notifications/i }).first()).toBeVisible()
|
||||
await page.keyboard.press('Control+KeyK')
|
||||
await expect(page.getByRole('dialog').or(page.getByPlaceholder(/search/i)).first()).toBeVisible().catch(() => {})
|
||||
})
|
||||
10
frontend/e2e/phase8-export.spec.ts
Normal file
10
frontend/e2e/phase8-export.spec.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { test, expect } from '@playwright/test'
|
||||
import { login } from './helpers'
|
||||
|
||||
test('page export control is available from a readable page', async ({ page }) => {
|
||||
test.skip(!process.env.E2E_USERNAME || !process.env.E2E_PASSWORD, 'Set E2E_USERNAME and E2E_PASSWORD')
|
||||
expect(await login(page)).toBeTruthy()
|
||||
const exportButton = page.getByRole('button', { name: /export page/i }).first()
|
||||
await expect(exportButton).toBeVisible()
|
||||
await expect(exportButton).toHaveAttribute('title', /export html/i)
|
||||
})
|
||||
16
frontend/e2e/phase8-history.spec.ts
Normal file
16
frontend/e2e/phase8-history.spec.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { test, expect } from '@playwright/test'
|
||||
import { login } from './helpers'
|
||||
|
||||
test('protected page editing exposes history and restore controls', async ({ page }) => {
|
||||
test.skip(!process.env.E2E_USERNAME || !process.env.E2E_PASSWORD, 'Set E2E_USERNAME and E2E_PASSWORD')
|
||||
expect(await login(page)).toBeTruthy()
|
||||
await page.getByRole('link', { name: /recent|pages|silo/i }).first().click().catch(() => {})
|
||||
const edit = page.getByRole('button', { name: /^edit$/i }).first()
|
||||
await expect(edit).toBeVisible()
|
||||
await edit.click()
|
||||
await expect(page.getByRole('button', { name: /update/i })).toBeEnabled()
|
||||
await page.getByRole('button', { name: /version history/i }).click()
|
||||
await expect(page.getByRole('heading', { name: /version history/i })).toBeVisible()
|
||||
await page.keyboard.press('Escape')
|
||||
await expect(page.getByRole('heading', { name: /version history/i })).toHaveCount(0)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue