Skip to content

E2E Framework: Click Element for Focus Before Filling In

What does this MR do and why?

browser_ui/1_manage/group/transfer_project_spec.rb occasionally fails because the file finder shortcut feature is being triggered by the test, where if you type t anywhere on a project's pages, it will redirect to the project's file search page. If the test happens to not be focused within the namespace search field and goes to start typing either the project or the target group's name (both which start with t in the test), this issue could occur.

Capybara's set method under the hood uses send_keys for inputs, which does not necessarily focus an element in the way a user action like a click would. This could cause issues on pages that use GitLab keyboard shortcuts. Since there are both global shortcuts and several pages that use their own shortcuts, I decided to add a click within our framework's fill_element method to hopefully mitigate these kinds of issues.

I've also updated qa/qa/page/merge_request/show.rb to dismiss the suggestion popover that was preventing the click on merge request diff suggestion text areas, and cleaned up methods that still used the old dismiss_popover_button element that no longer exists after !29340 (merged) was merged.

Related to: #371153 (closed)

NOTE: Not every test uses fill_element, so other tests or methods may need to be updated. I'll create a QA team task issue for the remaining areas that would need to be updated if we decide to merge this change in.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Valerie Burton

Merge request reports

Loading