Back to list
veerababumanyam

webapp-testing

by veerababumanyam

0🍴 0📅 Jan 22, 2026

SKILL.md


name: webapp-testing aliases: [e2e, playwright, browser-testing, screenshots, ui-testing] description: E2E and browser testing for RawDrive using Playwright MCP. Use for testing UI flows, verifying frontend functionality, debugging visual issues, and capturing screenshots.

RawDrive E2E Testing

Browser-based testing for RawDrive using Playwright MCP integration.

For unit/integration tests: See the testing skill (Vitest, pytest).

Playwright MCP Tools

RawDrive has Playwright MCP configured. Use these tools directly:

ToolPurpose
mcp__playwright__browser_navigateNavigate to URL
mcp__playwright__browser_snapshotGet accessibility tree (preferred over screenshot)
mcp__playwright__browser_clickClick elements
mcp__playwright__browser_typeType into inputs
mcp__playwright__browser_fill_formFill multiple form fields
mcp__playwright__browser_take_screenshotCapture screenshot
mcp__playwright__browser_console_messagesGet browser console logs

RawDrive Test URLs

EnvironmentURL
Local Frontendhttp://localhost:3000
Local Backendhttp://localhost:8000
Public Galleryhttp://localhost:3000/g/{slug}
Workspacehttp://localhost:3000/workspace/{id}

Common Test Flows

1. Login Flow

// Navigate to login
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/login' });

// Fill login form
await mcp__playwright__browser_fill_form({
  fields: [
    { name: 'email', type: 'textbox', ref: 'email-input', value: 'test@example.com' },
    { name: 'password', type: 'textbox', ref: 'password-input', value: 'password123' }
  ]
});

// Click login button
await mcp__playwright__browser_click({ element: 'Login button', ref: 'login-submit' });

// Wait for redirect
await mcp__playwright__browser_wait_for({ text: 'Dashboard' });
// Navigate to gallery
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/workspace/{id}/galleries/{id}' });

// Snapshot to verify content
await mcp__playwright__browser_snapshot({});

// Check for photo grid
await mcp__playwright__browser_click({ element: 'First photo', ref: 'photo-0' });

// Verify lightbox opens
await mcp__playwright__browser_snapshot({});
// Navigate to public gallery
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/g/wedding-2024' });

// Verify gallery loads
await mcp__playwright__browser_snapshot({});

// Test favorite button (client-side)
await mcp__playwright__browser_click({ element: 'Favorite button', ref: 'favorite-btn' });

4. Upload Flow

// Navigate to upload page
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/workspace/{id}/upload' });

// Upload file
await mcp__playwright__browser_file_upload({
  paths: ['/path/to/test-image.jpg']
});

// Wait for upload completion
await mcp__playwright__browser_wait_for({ text: 'Upload complete' });

Test Patterns

Snapshot-First Approach

Always take a snapshot before interacting:

// 1. Navigate
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/...' });

// 2. Snapshot to understand page structure
const snapshot = await mcp__playwright__browser_snapshot({});
// Examine snapshot to find correct element refs

// 3. Interact with discovered refs
await mcp__playwright__browser_click({ element: '...', ref: 'discovered-ref' });

Wait for Dynamic Content

RawDrive uses React Query - content loads asynchronously:

// Wait for specific text to appear
await mcp__playwright__browser_wait_for({ text: 'Gallery Name' });

// Or wait for loading to complete
await mcp__playwright__browser_wait_for({ textGone: 'Loading...' });

Debug with Console Logs

// Get console messages to debug issues
const logs = await mcp__playwright__browser_console_messages({ level: 'error' });

Test Data (Seed Users)

RawDrive seeds test users. See docs/TEST_USERS.md:

UserEmailPasswordWorkspace
Demo Photographerdemo@rawdrive.comdemo123Demo Studio
Test Adminadmin@rawdrive.comadmin123Admin Workspace

RawDrive-Specific Selectors

Common UI elements and their typical selectors:

ElementSelector Pattern
App buttons[data-testid="btn-*"] or by text
Photo cards.photo-card, [data-asset-id]
Gallery grid.gallery-grid
Modal dialogs[role="dialog"]
Toast notifications[role="alert"]
Navigationnav, [role="navigation"]

Scripts (Legacy)

The skill includes helper scripts for standalone Playwright:

ScriptPurpose
scripts/with_server.pyManages server lifecycle for standalone tests

For most cases, prefer using Playwright MCP tools directly over scripts.

Best Practices

Do's

  • Use browser_snapshot over browser_take_screenshot for understanding page structure
  • Wait for content (wait_for) before assertions
  • Test user flows, not implementation details
  • Check console for errors after each navigation
  • Use seed test users for authenticated flows

Don'ts

  • Don't interact with elements before confirming they exist (snapshot first)
  • Don't hardcode workspace/gallery IDs (use test fixtures)
  • Don't skip waiting for async content
  • Don't leave browser open after tests

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon