Optimize fill_element method in GitLab E2E Test Framework
Problem
In Evaluate Effort to Migrate Chemlab E2E Tests to GitLab QA Framework, while migrating a test from Chemlab to the GitLab E2E test framework as a POC, we discovered that the fill_element
method in the framework was considerably slower than using Chemlab or direct Capybara methods to fill out form elements.
This was found to be mainly due to click_element_coordinates
within the method.
click_element_coordinates
was originally added into fill_element
as a way to stabilize flaky tests that interacted with pages that have GitLab keyboard shortcuts. At times, the tests were not focusing on the elements and would end up triggering a keyboard shortcut on the page instead.
See this discussion #2572 (comment 1871870618) for more details on these findings
Proposal
We should see if we can:
- Optimize the
click_element_coordinates
method to perform faster, or - Find a different workaround to help tests avoid triggering keyboard shortcuts