Playwright · Senior · Question 68 of 77

How do you test that a feature behind a flag works in both states?

Show the answer

Correct answer: Set the flag per test through an API, cookie or init script

Explanation

Controlling the flag in the test makes both paths deterministic, and projects can run the suite with the flag on and off.

Further reading

Problem with a question

Playwright · Senior · question 68

Test yourself

Take the Playwright · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz