Commit fb8b597c authored by rpereira2's avatar rpereira2

Add info about have_pushed_frontend_feature_flags to docs

Add example usage of the have_pushed_frontend_feature_flags matcher to
feature flag development docs.
parent 2a71e37a
...@@ -440,6 +440,21 @@ Feature.enabled?(:my_feature2) # => false ...@@ -440,6 +440,21 @@ Feature.enabled?(:my_feature2) # => false
Feature.enabled?(:my_feature2, project1) # => true Feature.enabled?(:my_feature2, project1) # => true
``` ```
### `have_pushed_frontend_feature_flags`
Use `have_pushed_frontend_feature_flags` to test if [`push_frontend_feature_flag`](#frontend)
has added the feature flag to the HTML.
For example,
```ruby
stub_feature_flags(value_stream_analytics_path_navigation: false)
visit group_analytics_cycle_analytics_path(group)
expect(page).to have_pushed_frontend_feature_flags(valueStreamAnalyticsPathNavigation: false)
```
### `stub_feature_flags` vs `Feature.enable*` ### `stub_feature_flags` vs `Feature.enable*`
It is preferred to use `stub_feature_flags` to enable feature flags It is preferred to use `stub_feature_flags` to enable feature flags
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment