Loading challenge...
Real-time collaborative text editing
Real-time multi-user editing
Recent edits from all users
No operations yet. Start typing or enable simulation.
Key areas to test
Testing hints
// Test collaborative editing
await page.click('[data-testid="toggle-simulation"]');
// Verify users join
await expect(page.locator('[data-testid="active-users"]'))
.toContainText('Alice');
// Check cursor positions update
const cursor = page.locator('[data-testid="cursor-user-1"]');
const initialLeft = await cursor.getAttribute('style');
await page.waitForTimeout(3000);
const newLeft = await cursor.getAttribute('style');
expect(initialLeft).not.toBe(newLeft);
// Test disconnect/reconnect
await page.click('[data-testid="simulate-disconnect"]');
await expect(page.locator('[data-testid="connection-status"]'))
.toHaveText('🔴 Disconnected');
await expect(page.locator('[data-testid="connection-status"]'))
.toHaveText('🟢 Connected', { timeout: 5000 });
// Verify operation log
await page.locator('[data-testid="editor"]').fill('Test input');
await expect(page.locator('[data-testid="operation-log"]'))
.toContainText('insert');