test: add coverage report for feature flags in e2e#27970
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| scripts/reports/ | ||
|
|
||
| # Feature flag coverage report (generated) | ||
| tests/feature-flags/feature-flag-coverage-report.json |
There was a problem hiding this comment.
can we use /tmp folder instead or another?
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes touch: app source code, E2E test files, test fixtures, page objects, test helpers, controllers, navigation, or any shared component. There is no risk of breaking existing E2E tests. No E2E test tags are needed. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| console.log(' PARTIAL COVERAGE (only one state tested)'); | ||
| console.log(` ${'-'.repeat(40)}`); | ||
| for (const entry of partialFlags) { | ||
| const missing = entry.testedStates.true ? 'false' : 'true'; |
There was a problem hiding this comment.
Misleading "missing state" message for partial coverage flags
Low Severity
When a flag has a non-boolean productionDefault (e.g., arrays like additionalNetworksBlacklist: []) and is referenced in test files without extractable truthy/falsy values, determineCoverage classifies it as 'partial' even though testedStates is {true: false, false: false} — neither state is actually tested. Then printReport computes const missing = entry.testedStates.true ? 'false' : 'true', which assumes one state IS tested, producing a misleading "missing: true state" message when both states are untested. This also inflates coveragePercentage since these flags are counted in partialCount.
Additional Locations (1)
|





Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: changes are confined to QA metrics collection and a scheduled GitHub Actions workflow, but it adds a
yarn install+ts-nodeexecution step that could fail if dependencies or paths drift.Overview
Adds feature-flag E2E coverage reporting to QA stats. The QA stats collector now runs a new
ts-node-based scanner (tests/feature-flags/feature-flag-coverage-report.ts) that parsestests/smoke/tests/regressionfor references toFEATURE_FLAG_REGISTRY, classifies per-flag coverage (full/partial/default-only), writestests/artifacts/feature-flag-coverage-report.json, and emits aggregated metrics under a newfeature_flagsnamespace inqa-stats.json.The
qa-stats.ymlscheduled workflow is updated to cache/install Yarn dependencies (required forts-node) and to upload the feature-flag coverage JSON as a separate artifact.Written by Cursor Bugbot for commit 27ecb4f. This will update automatically on new commits. Configure here.