Updated labs tests to not rely on specific flags#26622
Updated labs tests to not rely on specific flags#26622troyciesco wants to merge 1 commit intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughThe test file for labs functionality was updated to use dynamic keys instead of hardcoded values. Tests were refactored to verify config precedence over settings using runtime-computed writable flags or GA keys. Skip conditions were added to prevent execution when relevant allowlists or GA keys are empty. Assertions were adjusted to reference the dynamically selected keys in both config injections and expected results. The changes generalize the test scope to validate behavior across any applicable keys rather than a single fixed flag. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
26c87d0 to
63441a4
Compare
| } | ||
|
|
||
| // NOTE: this test should be rewritten to test the alpha flag independently of the internal ALPHA_FEATURES list | ||
| // otherwise we end up in the endless maintenance loop and need to update it every time a feature graduates from alpha |
There was a problem hiding this comment.
i think this test wasn't doing anything. enableDeveloperExperiments doesn't seem to change anything about what labs are returned, i think it just controls whether the tab for editing PRIVATE_FEATURES shows up in the UI.
to further check, i create the inverse of this test ("does not return an alpha flag when dev experiments is false") and it failed.
based on how labs works with getAll() returning all beta and private keys, I don't think a test is needed here.
63441a4 to
f67ad87
Compare
|
I'll plan to review this next week. Let me know if you want me to look sooner. |
no ref
announcementBarflag was removed in RemovedannouncementBarfeature flag #26196. That means this test was looking at a state that wasn't really trueGA_KEYSlist. If there's nothing in the list, the test can be skipped.