Note: This issue was created by Claude AI working with @Diplow
Problem
E2E tests are not properly configured for testing complex interactions like drag and drop. This blocks proper testing of the drag and drop feature (#29).
Current Issues
- E2E test setup may not support drag and drop simulation
- Playwright configuration might need updates for complex mouse interactions
- Missing helpers for simulating drag operations in tests
Requirements
Proposed Test Helper
// tests/e2e/helpers/drag-and-drop.ts
export async function dragTile(
page: Page,
sourceTileId: string,
targetPosition: string
) {
const source = page.locator(`[data-tile-id="${sourceTileId}"]`);
const target = page.locator(`[data-drop-zone="${targetPosition}"]`);
await source.dragTo(target);
// Wait for optimistic update
await page.waitForSelector(`[data-tile-id="${sourceTileId}"][data-position="${targetPosition}"]`);
}
Example E2E Test
test('can drag tile to empty sibling position', async ({ page }) => {
// Setup
await page.goto('/map/test-user/test-group');
// Find a draggable tile
const tile = page.locator('[data-tile-id="tile-1"]');
await expect(tile).toHaveAttribute('draggable', 'true');
// Drag to empty position
await dragTile(page, 'tile-1', 'empty-west');
// Verify move completed
await expect(tile).toHaveAttribute('data-position', 'west');
});
Success Criteria
Related to: #29, #30
Note: This issue was created by Claude AI working with @Diplow
Problem
E2E tests are not properly configured for testing complex interactions like drag and drop. This blocks proper testing of the drag and drop feature (#29).
Current Issues
Requirements
Proposed Test Helper
Example E2E Test
Success Criteria
Related to: #29, #30