Fix a QA instability in the maven scenario
🍉 Context
In #344843 (closed), it has been detected that an example of the maven QA scenario failed quite consistently.
The example is part of a context that has two examples:
- Switch the
allow duplicates
setting on, upload a duplicated package and check that it's successful - Switch the
allow duplicates
setting off, upload a duplicated package and check that it's not successful
Here is the UI where the setting is for maven packages:
🔥 Problem
The issue lies in the helpers used to manipulate the setting toggle.
It seems that the #click_element
function doesn't work when the setting is off and we click on it.
Screen_Recording_2021-11-05_at_13.01.28
🔬 What does this MR do and why?
- Update the helpers function to actually
#click
on the button itself - Update how the button state is checked
- It was done through a label content but it would be more reliable to check the css classes on the button.
📷 Screenshots or screen recordings
$ WEBDRIVER_HEADLESS=false bundle exec bin/qa Test::Instance::All http://172.16.123.1:8000 -- qa/specs/features/browser_ui/5_package/package_registry/maven_repository_spec.rb --tag orchestrated --tag packages
[...snip...]
Finished in 11 minutes 35 seconds (files took 8.39 seconds to load)
3 examples, 0 failures
Randomized with seed 50164
⚗ How to set up and validate locally
- Pull the MR branch
- Run the maven QA scenario as above
🛃 MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by David Fernandez