E2E Test Specifications
This directory contains E2E test specifications for App Suite for Teams. Each specification documents user workflows, acceptance criteria, and test scenarios for Playwright tests.
Application Overview
App Suite for Teams is a collaborative email management application built on Vue 3 with real-time synchronization capabilities. Key technical components:
Real-time Collaboration
- Yjs (CRDT): Conflict-free state sharing for collaborative editing
- TipTap: Rich text editor with collaboration extensions
- WebSocket: Custom provider for real-time notifications and awareness
- PostgreSQL + IndexedDB: Persistent storage for shared state
Architecture
- Frontend: Vue 3 SPA with Pinia state management
- Backend: Fastify with PostgreSQL database
- Authentication: JWT-based with
<username>@teamsformat - Real-time: WebSocket for notifications, Yjs awareness for presence
See Technical Patterns for detailed architecture patterns.
Test Environment
Standard Configuration
- URL:
https://localhost:5173/(or configuredLAUNCH_URL) - Authentication: Users log in with
<username>@teamsformat - Shared Inbox: Tests use "Support" inbox by default
- Multi-user: Tests support multiple authenticated browser contexts
Running Tests
# Run all E2E tests
pnpm e2e
# Run single spec
LAUNCH_URL=https://localhost:5173 npx playwright test e2e/tests/[test-name].spec.js
# Run with specific browser
npx playwright test --project=chromium
# Debug mode
npx playwright test --debugCommon Fixtures
Authentication
storageState: Persisted auth state for test usersusers: Array fixture providing multiple authenticated users- Format: Login with
<username>@teams(e.g.,alice@teams,bob@teams)
Data Setup
sendMail: Fixture for sending test emails to shared inboxinbox: Access to shared inbox (default: "Support")thread: Thread creation and manipulation
Multi-user Testing
- Parallel contexts: Tests can spawn multiple authenticated browser contexts
- Storage states: Each user has persistent authentication
- Synchronization: Tests verify real-time sync across users
See E2E Testing Guide for comprehensive fixture documentation.
Test Specification Format
Each test spec follows this structure:
1. Feature Description
Brief description of the feature being tested and its purpose.
2. Seed Data Requirements
Test-specific preconditions and data setup requirements.
3. Test Scenarios
Structured test cases with:
- Objective: What the test verifies
- Preconditions: Required setup
- Test Steps: User actions to perform
- Expected Results: Observable outcomes
4. Edge Cases (if applicable)
Boundary conditions, error states, and unusual scenarios.
Test Organization
Test specifications are organized by feature:
| Specification | Test File | Description |
|---|---|---|
assignee-spec.md | assignee.spec.js | Thread assignment workflow |
comments-spec.md | comments.spec.js | Comment threads functionality |
deep-links-spec.md | deep-links.spec.js | URL-based thread navigation |
draft-awareness-spec.md | draft-awareness.spec.js | Collaborative draft awareness |
inbox-list-spec.md | inbox-list.spec.js | Inbox list and thread management |
mail-detail-spec.md | mail-detail.spec.js | Thread detail view |
mentions-keyboard-navigation-spec.md | mention-keyboard-navigation.spec.js | Mention autocomplete keyboard UX |
multiuser-spec.md | multiuser.spec.js | Real-time multi-user collaboration |
provisioning-spec.md | provisioning.spec.js | Account setup and configuration |
reply-spec.md | reply.spec.js | Email reply functionality |
status-spec.md | status.spec.js | Thread status tracking |
categories-spec.md | tagging.spec.js | Thread categories |
tour-view-spec.md | tour-view.spec.js | Application tour |
Writing Test Specifications
When creating new test specs:
- Focus on scenarios: Describe user workflows, not implementation details
- Be specific: Include concrete examples and expected outcomes
- Avoid duplication: Reference this index for common patterns
- Keep concise: Target 150-200 lines per spec
- Reference patterns: Link to Technical Patterns instead of repeating architecture details
Troubleshooting
Common Issues
- Authentication failures: Verify
<username>@teamsformat - Timeout errors: Check that backend (
pnpm dev) and frontend (pnpm vite dev) are running - WebSocket connection: Ensure both services are accessible
- Test data: Confirm "Support" inbox exists and is accessible
Debug Strategies
- Use
--headedflag to watch tests execute - Add
await page.pause()to inspect state - Check browser console for errors
- Verify network requests in DevTools
See E2E Troubleshooting Guide for comprehensive troubleshooting.
Related Documentation
- E2E Testing Guide - Comprehensive Playwright testing guide
- E2E Troubleshooting - Debugging and troubleshooting
- Unit Testing Guide - Vitest unit testing patterns
- Technical Patterns - Architecture patterns
- Feature Specifications - Product feature docs

