Skip to content

[ZEPPELIN-6686] Align E2E coverage with Angular component targets - #5445

Open
voidmatcha wants to merge 1 commit into
apache:masterfrom
voidmatcha:fix/e2e-coverage-targets
Open

[ZEPPELIN-6686] Align E2E coverage with Angular component targets#5445
voidmatcha wants to merge 1 commit into
apache:masterfrom
voidmatcha:fix/e2e-coverage-targets

Conversation

@voidmatcha

Copy link
Copy Markdown
Member

What is this PR for?

CoverageReporter ignored the configured transform targets and scanned the Angular source tree again with scandirectory. This kept structural components in the report denominator and allowed PAGES to drift from the reported targets.

This PR uses cfg.transform as the reporter denominator. getCoverageTransformPaths() discovers src/app/**/*.component.ts, removes four explicit structural components, and sorts the result. A Vitest spec requires PAGES to match the discovered targets.

Node.js 22 provides fs.globSync, so this PR removes scandirectory. It also includes package-level reporter specs in the shell Vitest, TypeScript and ESLint paths.

The metric covers the current Angular-hosted routes. A later route cutover must define how React-owned routes are counted.

This PR does not change runtime behavior, add E2E coverage, or introduce a coverage threshold. The current source tree contains 57 Angular components and four exclusions, resulting in 53 targets.

The affected AGENTS.md files document the new rules. The package guidance also reflects the TestBed setup merged through ZEPPELIN-6637.

What type of PR is it?

Bug Fix

Todos

  • Use transform as the reporter denominator
  • Discover Angular component targets
  • Check PAGES and exclusion alignment
  • Remove scandirectory
  • Include package-level reporter specs in test and lint configuration
  • Update the applicable AGENTS.md files

What is the Jira issue?

ZEPPELIN-6686

How should this be tested?

cd zeppelin-web-angular
npm run test:shell
npx tsc -p src/tsconfig.spec.json --noEmit
npx eslint \
  e2e/reporter.coverage.ts \
  e2e/reporter.coverage.config.ts \
  e2e/utils.ts \
  test/reporter.coverage.spec.ts \
  vitest.shell.config.mts \
  eslint.config.js

Results:

  • Shell tests: 7 files and 32 tests passed
  • Reporter tests: 3 tests passed
  • TypeScript check: passed
  • ESLint: 0 errors and 5 existing warnings in unchanged wait helpers
  • Current target alignment: 57 components, four exclusions and 53 targets

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? The affected AGENTS.md files are updated.

@voidmatcha
voidmatcha force-pushed the fix/e2e-coverage-targets branch from fbb88f0 to dd2d7d8 Compare August 30, 2026 01:51
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