Skip to content

Fix flaky tests in spec/features/protected_branches_spec.rb

What does this MR do and why?

This MR fixes a flaky test affecting protected branches.

The dropdown is sometimes not fully visible in the view to be clicked. The dropdown also covers some buttons that need to be visible for some scenarios.

Solution

  • Resizing the window allows the dropdown to fit in the view. In this case, I chose to maximize the window to avoid any glitches caused by a fixed width and height.
  • Scroll to a position where the dropdown can be seen.
  • Click the dropdown to force it to hide when the selection is done.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Run WEBDRIVER_HEADLESS=0 bundle exec rspec spec/features/protected_branches_spec.rb locally.

Related to #461739 (closed)

Edited by Javiera Tapia

Merge request reports