Skip to content

Comments

Feat/add e2e testing playwright#8

Closed
jomzxc wants to merge 9 commits intodevelopfrom
feat/add-e2e-testing-playwright
Closed

Feat/add e2e testing playwright#8
jomzxc wants to merge 9 commits intodevelopfrom
feat/add-e2e-testing-playwright

Conversation

@jomzxc
Copy link
Owner

@jomzxc jomzxc commented Nov 5, 2025

No description provided.

jomzxc and others added 9 commits November 5, 2025 23:07
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
…rategy

Add comprehensive automated testing infrastructure with unit and E2E tests
@jomzxc jomzxc requested a review from Copilot November 5, 2025 17:39
@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
webdrop Ready Ready Preview Comment Nov 5, 2025 6:05pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive testing infrastructure for the WebDrop application, including both unit tests (Vitest) and end-to-end tests (Playwright). The changes introduce test configuration files, test utilities, and test suites covering authentication, room management, file transfers, UI components, and utility functions.

Key Changes:

  • Added Vitest and Playwright test configurations
  • Implemented E2E tests for authentication, room management, file transfers, profile management, and UI
  • Created unit tests for utility functions, file transfer manager, and React components
  • Set up test fixtures and helper utilities including testmail.app integration for email testing

Reviewed Changes

Copilot reviewed 20 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vitest.config.ts Vitest configuration with jsdom environment and coverage settings
tests/setup.ts Test setup with mocks and polyfills - contains duplicate router mock
tests/utils/polyfills.ts Blob polyfill for jsdom environment
tests/utils/testmail.helper.ts Email testing utilities using testmail.app
tests/global.setup.ts Global test setup for creating authenticated users
tests/*.spec.ts Playwright E2E test suites
tests/unit/**/*.test.ts Vitest unit test suites
.gitignore Added test output directories
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +46
// Mock Next.js router
vi.mock('next/navigation', () => ({
useRouter: () => ({
push: vi.fn(),
replace: vi.fn(),
prefetch: vi.fn(),
back: vi.fn(),
}),
usePathname: () => '/',
useSearchParams: () => new URLSearchParams(),
}))
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Next.js router mock is duplicated twice (lines 23-33 and 36-46). Remove one of the duplicate blocks to avoid confusion and maintain cleaner code.

Suggested change
// Mock Next.js router
vi.mock('next/navigation', () => ({
useRouter: () => ({
push: vi.fn(),
replace: vi.fn(),
prefetch: vi.fn(),
back: vi.fn(),
}),
usePathname: () => '/',
useSearchParams: () => new URLSearchParams(),
}))

Copilot uses AI. Check for mistakes.
@jomzxc jomzxc closed this Nov 5, 2025
@jomzxc jomzxc deleted the feat/add-e2e-testing-playwright branch November 6, 2025 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants