-
Notifications
You must be signed in to change notification settings - Fork 227
[APIView] Add Playwright UI Test Suite for APIView ClientSPA #13408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 introduces a comprehensive Playwright-based end-to-end test suite for the APIView Angular ClientSPA application. The test infrastructure covers core workflows including review page loading, code panel interactions, commenting functionality, navigation, and batch operations on related comments.
Key Changes
- Added Playwright test framework with ~69 tests across 7 test specification files
- Implemented page object model pattern with reusable page objects and helper utilities
- Created extensive mock data and API handlers for isolated testing
- Added test configuration, documentation, and npm scripts for running tests
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
playwright.config.ts |
Playwright configuration with base URL, timeout, and browser settings |
package.json |
Added Playwright dependency and test scripts (test:ui, test:ui:headed, etc.) |
page-objects/*.ts |
Page object models implementing reusable test abstractions |
helpers/comment-helpers.ts |
Helper functions for comment CRUD operations and API request capture |
mocks/api-handlers.ts |
Mock API handlers for auth, review, comments, and revisions endpoints |
fixtures/index.ts |
Comprehensive mock data for code panels, comments, and user profiles |
tests/review-page/*.spec.ts |
Test specs covering basic functionality, code panel, comments, navigation, and related comments |
tests/conversation-page/conversations.spec.ts |
Tests for conversations sidebar functionality |
README.md |
Documentation for running and debugging tests |
.gitignore |
Excludes test results and reports from version control |
Files not reviewed (1)
- src/dotnet/APIView/ClientSPA/package-lock.json: Language not supported
closes: #13039
Introduces comprehensive end-to-end UI testing infrastructure for the APIView Angular ClientSPA using Playwright. The test suite covers all major user workflows including review page loading, code panel interactions, comments, navigation, and batch operations.
Test Coverage (~69 tests)
basic.spec.tscode-panel.spec.tscode-panel-interaction.spec.tscomments-interaction.spec.tsnavigation-interaction.spec.tsrelated-comments.spec.tsconversations.spec.tsKey Workflows Tested
Running Tests
Start Angular dev server
Run tests
TODO
There are still sections/actions pending to test that I will address later: