Update burndown e2e tests and mocks for feature flag handling#150
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
aymenfurter
approved these changes
Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #109. The burndown e2e tests were failing because
FF_TOKEN_REPORTING_ENABLEDis off, soapp.tsremoves the[data-page="burndown"]nav link at runtime. The tests still tried to click that (now-missing) link, timing out for 30s × 5 tests inbeforeEach.Since burndown won't be re-enabled in the near future, this PR makes the tests skip gracefully instead of failing, and adds
TODOnotes so the stale assertions and incomplete mock get fixed when the flag is flipped back on.Changes
tests/e2e/burndown.spec.tsnavigateToBurndownhelper intobootHarness(load + wait for render) and the nav-click step.beforeEach, after the harness boots, check whether[data-page="burndown"]still exists. The flag-gating removal runs synchronously onapp.jsload, so the link is already gone by boot time →test.skip(...)fires before any click, avoiding the timeout.TODO(FF_TOKEN_REPORTING_ENABLED)block documenting the stale value assertions (oldgetBurndown1500 / 248 / 2480vs newgetAiCreditBurndown300 / 42.5 / 425).tests/e2e/harness.html— Added aTODO(FF_TOKEN_REPORTING_ENABLED)note on thegetAiCreditBurndownmock listing the missing fields (byModel,missingPct,countedRequests,partialRequests,pendingRequests,noDataRequests,finalizableRequests,delegatedRequests,coverageByDay,daysUntilExhaustion,safeDailyBudget,projectedOverage,totalRequests) that block the status section from rendering; points to the real shape insrc/core/analyzer-consumption.ts.src/core/constants.ts— Added a comment at theFF_TOKEN_REPORTING_ENABLEDdefinition reminding whoever re-enables it to update the two test files above.All three notes share the searchable tag
TODO(FF_TOKEN_REPORTING_ENABLED)— a single grep surfaces every spot to fix.Testing
npx playwright test tests/e2e/burndown.spec.tsBefore:
After:
Exits 0.