Skip to content

Rewrite protected branches feature & E2E tests to the new flow

While working on removing the old protected branches section in project's settings, I realised there's quite a bit of feature tests that still run based on that. In the end I had to hide the section using edit_branch_rules feature flag, instead of removing it.

Note: That source code of that section needs to stay, as it is still used on the group level settings, but we can remove the rendering on the project level.

Here's a list of feature tests and helpers affected (though it may not be complete):

  • ee/spec/features/projects/settings/ee/protected_branches_spec.rb
  • ee/spec/features/projects/protected_branches_spec.rb
  • ee/spec/features/protected_branches_spec.rb
  • spec/features/protected_branches_spec.rb
  • spec/views/projects/settings/repository/_protected_branches.html.haml_spec.rb
  • spec/support/shared_examples/features/protected_branches_access_control_ce_shared_examples.rb
  • ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb
  • spec/support/shared_examples/projects/protected_branches_shared_examples.rb
  • spec/support/protected_branch_helpers.rb

And the list of E2E files affected:

  • qa/qa/specs/features/browser_ui/3_create/repository/add_new_branch_rule_spec.rb
  • qa/qa/specs/features/ee/browser_ui/3_create/repository/assign_code_owners_spec.rb
  • qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb
  • qa/qa/resource/protected_branch.rb
  • qa/qa/page/project/settings/repository.rb

I'd want to propose rewriting these separately and ahead of Cleanup edit_branch_rules feature flag (#498288)

When rewriting this, we need to be sure that we are testing exactly the same cases, but just using the new UI.

Edited by 🤖 GitLab Bot 🤖