Skip to content

Conversation

@AlitzelMendez
Copy link
Member

@AlitzelMendez AlitzelMendez commented Dec 19, 2025

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)

Spec File Tests Coverage
basic.spec.ts 7 Page loading, layout, URL routing
code-panel.spec.ts 4 Loading states, responsive layout
code-panel-interaction.spec.ts 15 Line actions, toggles, virtual scrolling, diff mode
comments-interaction.spec.ts 19 Create, reply, upvote, downvote, edit, resolve, delete
navigation-interaction.spec.ts 12 Tree navigation, expand/collapse, panel resize, search
related-comments.spec.ts 11 Related comments dialog, batch operations
conversations.spec.ts 1 Conversations side panel

Key Workflows Tested

  • Review Page: Load with query params, splitter layout, page options toggle
  • Code Panel: Virtual scrolling, line actions, diff mode, visibility toggles
  • Comments: Full CRUD workflows, AI feedback dialog, scroll persistence
  • Navigation: Tree expand/collapse, search filter, panel resize
  • Related Comments: Batch resolve, upvote, reply, and delete operations

Running Tests

Start Angular dev server

npm run start -- --ssl

Run tests

npm run e2e           # Headless
npm run e2e:headed    # With browser visible
npm run e2e:debug     # Interactive UI mode

TODO

There are still sections/actions pending to test that I will address later:

  • Samples side panel tests
  • CI pipeline integration (not required initially - we need to analyze first if tests are flaky, but at least keep this running locally)

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 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

@AlitzelMendez AlitzelMendez merged commit 198331c into Azure:main Jan 9, 2026
7 checks passed
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.

[API View] Add E2E Testing to API View

2 participants