Skip to content

combined_menu flag feature specs [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Chad Woolley requested to merge combined-menu-flag-feature-specs into master

What does this MR do?

Adds feature spec coverage for features to be added/modified as part of Combine Projects, Groups, and More into one menu (issue).

  • Wraps existing specs which fail with flag on in a shared example.
  • Introduced two contexts for flag on and flag off which use these examples.
  • Marked as pending all examples which fail with the feature flag on. These will be updated and made to pass as the features are implemented in follow-on MRs.

Workflow for how we are using pending examples

  1. All existing specs which fail with the flag on are wrapped in a "shared" context, and executed from two new contexts, "on" and "off", with the flag on and off, respectively.
  2. All failing examples in these specs are marked as pending from the "on" context. Examples which are not failing are not marked pending, but are still included in the "on" context to provide full coverage of both flag states.
  3. As the features are implemented and the specs begin passing, there are two options:
    1. If the example passes unmodified with the flag on, then ensure it is unpended in the "shared" context.
    2. If the example needs modifications to pass, then duplicate it in the "on" and "off" context, and make the necessary changes in the "on" context to make it pass with the new implementation.
  4. Once the feature is fully implemented, no pending examples should remain.
  5. When the feature flag is removed:
    1. The "off" context can be deleted,
    2. The "on" context can be combined with the "shared" context at the top level, and the flag nesting context removed.

Performance note

Please note that this results in temporarily duplicating our test execution which will add some test time. We are willing to accept this because:

  • It provides full coverage of the on/off cases.
  • It is temporary and easy to undo when we remove the feature flag.

Does this MR meet the acceptance criteria?

Conformity

Edited by Chad Woolley

Merge request reports

Loading