๐Ÿงช Test Cases for Unified Space & Project Management

Comprehensive test cases for verifying the implementation of the unified space and project management system. These tests cover all major functionality including space creation, member management, project features, and error handling.

Test Environment Setup

Before running tests, ensure:

  • Development server is running on http://localhost:3000
  • You have at least 2 test user accounts
  • Browser DevTools console is open for error monitoring
  • Network tab is available for API call verification

1. Space Creation & Management

Test Case 1.1: Create a New Document Space

Core Feature

Steps:

  1. Click on "+" button in the sidebar
  2. Select "Create Space" option
  3. Enter space name: "Marketing Docs"
  4. Select space type: "Document"
  5. Choose icon: ๐Ÿ“„
  6. Set permission: "Public"
  7. Click "Create"
Expected Result:
  • New space appears in sidebar with ๐Ÿ“„ icon
  • Space is accessible to all workspace members
  • Space shows in the outline with correct hierarchy

Test Case 1.2: Create a New Project Space

Core Feature

Steps:

  1. Click on "+" button in the sidebar
  2. Select "Create Space" option
  3. Enter space name: "Q1 Product Launch"
  4. Select space type: "Project"
  5. Choose icon: ๐Ÿš€
  6. Set permission: "Private"
  7. Click "Create"
Expected Result:
  • New project space appears in sidebar with ๐Ÿš€ icon
  • Project space includes a Kanban board view automatically
  • Only space creator has access initially

2. Space Member Management

Test Case 2.1: Invite Members to Space

Collaboration

Steps:

  1. Right-click on any space in sidebar
  2. Select "Manage Space"
  3. Click "Manage Space Members" button
  4. Click "Invite Members" button
  5. Enter email: "colleague@company.com"
  6. Select role: "Editor"
  7. Click "Send Invitation"
Expected Result:
  • Invitation sent successfully message appears
  • Pending invitation shows in members list
  • Invited user receives invitation email

Test Case 2.2: Change Member Role

Permissions

Steps:

  1. Navigate to Space Members Settings
  2. Find existing member in the list
  3. Click on role dropdown (e.g., "Editor")
  4. Change to "Admin"
  5. Confirm the change
Expected Result:
  • Role updates immediately
  • Member gains admin permissions
  • Can now manage other members

Test Case 2.3: Remove Space Member

Destructive

Steps:

  1. Navigate to Space Members Settings
  2. Find member to remove
  3. Click three-dot menu next to member
  4. Select "Remove from space"
  5. Confirm removal
Expected Result:
  • Member removed from space
  • Member loses access to space content
  • Member count updates

3. Project Space Features

Test Case 3.1: Create Tasks in Project Space

Core Feature

Steps:

  1. Open a project space (e.g., "Q1 Product Launch")
  2. Click "Add Task" button
  3. Fill in:
    • Title: "Design landing page"
    • Description: "Create mockups for new product landing"
    • Status: "To Do"
    • Priority: "High"
  4. Click "Create Task"
Expected Result:
  • Task appears in "To Do" column
  • Task shows high priority indicator
  • Task is persisted (refresh page to verify)

Test Case 3.2: Drag & Drop Tasks

Core Feature

Steps:

  1. Open project space with existing tasks
  2. Click and hold on a task in "To Do" column
  3. Drag task to "In Progress" column
  4. Release mouse button
Expected Result:
  • Task moves smoothly to new column
  • Status updates to "In Progress"
  • Change persists after page refresh

Test Case 3.3: Edit Task Details

Task Management

Steps:

  1. Click three-dot menu on any task
  2. Select "Edit Task"
  3. Update:
    • Title: Add " - URGENT" to title
    • Priority: Change to "High"
    • Description: Add more details
  4. Click "Save Changes"
Expected Result:
  • Task updates immediately
  • Changes visible on task card
  • Updates persist after refresh

Test Case 3.4: Delete Task

Destructive

Steps:

  1. Click three-dot menu on a task
  2. Select "Delete Task"
  3. Confirm deletion
Expected Result:
  • Task removed from board
  • No errors in console
  • Task doesn't reappear after refresh

4. Space Permissions

Test Case 4.1: Verify Owner Permissions

Security

Steps:

  1. Create a new space as Owner
  2. Verify you can:
    • Edit space name/icon
    • Manage all members
    • Delete the space
    • Change space permissions
Expected Result:
  • All administrative actions available
  • No permission errors

Test Case 4.2: Verify Editor Permissions

Security

Steps:

  1. Access a space where you're an Editor
  2. Try to:
    • โœ… Create/edit content
    • โœ… View all content
    • โŒ Manage members (should be disabled)
    • โŒ Delete space (should be disabled)
Expected Result:
  • Can edit content but not manage space
  • Management options are disabled/hidden

Test Case 4.3: Verify Viewer Permissions

Security

Steps:

  1. Access a space where you're a Viewer
  2. Try to:
    • โœ… View all content
    • โŒ Create/edit content
    • โŒ Manage members
    • โŒ Edit tasks
Expected Result:
  • Read-only access
  • No edit buttons visible
  • Cannot drag & drop tasks

5. Migration & Integration

Test Case 5.1: Migrate Existing Pages to Spaces

Migration

Steps:

  1. Click on workspace settings
  2. Select "Migration Wizard"
  3. Choose migration type: "Convert pages to spaces"
  4. Select pages to migrate
  5. Map permissions for each page
  6. Click "Start Migration"
Expected Result:
  • Progress bar shows migration status
  • Selected pages converted to spaces
  • Original hierarchy preserved
  • Permissions applied correctly

Test Case 5.2: Use Space Templates

Templates

Steps:

  1. Click "+" in sidebar
  2. Select "Create from Template"
  3. Choose "Project Template"
  4. Customize:
    • Name: "Mobile App Development"
    • Icon: ๐Ÿ“ฑ
  5. Click "Create"
Expected Result:
  • Space created with predefined structure
  • Includes sample tasks and categories
  • Ready-to-use project board

6. Search & Analytics

Test Case 6.1: Search Within Space

Search

Steps:

  1. Open any space
  2. Use Cmd/Ctrl + K for quick search
  3. Type a keyword that exists in the space
  4. Select "Search in current space only"
Expected Result:
  • Results filtered to current space
  • Shows matching documents/tasks
  • Quick navigation to results

Test Case 6.2: View Space Analytics

Analytics

Steps:

  1. Open a project space
  2. Look at the stats dashboard showing:
    • Total tasks
    • In Progress tasks
    • Completed tasks
    • Team members
Expected Result:
  • Real-time statistics displayed
  • Numbers match actual task counts
  • Updates when tasks change

7. Error Handling & Edge Cases

Test Case 7.1: Handle Network Errors

Error Handling

Steps:

  1. Open browser DevTools
  2. Go to Network tab, set to "Offline"
  3. Try to create a new task
  4. Re-enable network
Expected Result:
  • User-friendly error message appears
  • No app crash
  • Can retry when network returns

Test Case 7.2: Concurrent Editing

Collaboration

Steps:

  1. Open same project in two browser tabs
  2. Create a task in Tab 1
  3. Switch to Tab 2 and refresh
  4. Edit the same task in both tabs
Expected Result:
  • Changes sync between tabs
  • Last edit wins
  • No data corruption

8. Performance Tests

Test Case 8.1: Large Number of Tasks

Performance

Steps:

  1. Create 50+ tasks in a project
  2. Test:
    • Page load time
    • Drag & drop responsiveness
    • Search performance
Expected Result:
  • Page loads in < 3 seconds
  • Drag & drop remains smooth
  • Search returns results instantly

๐Ÿ” Verification Checklist

After running all tests, verify:

  • โ˜ No console errors in browser DevTools
  • โ˜ All data persists after page refresh
  • โ˜ UI remains responsive
  • โ˜ Proper error messages for invalid actions
  • โ˜ Correct permission enforcement
  • โ˜ Smooth animations and transitions
  • โ˜ Mobile responsive design works

๐Ÿ“ Notes for Testers

  1. Test Data Setup: Create at least 3 spaces of different types with various permission levels
  2. Multiple Users: Test with at least 2 different user accounts to verify permissions
  3. Browser Testing: Test on Chrome, Firefox, and Safari
  4. State Persistence: Always refresh page after actions to verify persistence
  5. Console Monitoring: Keep browser console open to catch any errors