Cypress · Senior · Question 31 of 76
How should feature flags be handled in Cypress tests?
- 1Set flags per test, e.g. via API or intercepted config
- 2Flags only affect the UI, so tests can ignore them
- 3Turn on every flag in every environment before running
Show the answer
Correct answer: Set flags per test, e.g. via API or intercepted config
Explanation
Controlling the flag makes both paths testable and stops tests failing when someone toggles a shared flag.