Skip to content

[Sprint/NuancedNumbat](feat): Enable feature flags when staging cookie set. #857

Ben requested to merge fix/e2e-tests-staging into master

Summary

This allows for an override of the feature service by the setting of a cookie, containing a base64 encoded JSON object (see below for examples).

To test

  1. Add a new cookie to your session on the sandbox, staging-cookie.

  2. Set the value to a base64 encoded JSON object (I used https://www.base64encode.net/) containing a feature flag that you can test. At the time of writing cdn-jwt and cassandra-notifications are the only feature flags I see in there.

Example objects:

  • {"cdn-jwt":true} => eyJjZG4tand0Ijp0cnVlfQ==
  • {"cdn-jwt":false} => eyJjZG4tand0IjpmYWxzZX0=
  • {"cassandra-notifications":true} => eyJjYXNzYW5kcmEtbm90aWZpY2F0aW9ucyI6dHJ1ZX0=
  • {"cassandra-notifications":false} => eyJjYXNzYW5kcmEtbm90aWZpY2F0aW9ucyI6ZmFsc2V9
  1. Refresh and test whether the cookie worked.

note make sure to check the flag is still used! suggest a search of the codebase for ->has( if you're not sure.

Edited by Ben

Merge request reports