Commit 64b93ca8 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'qa-remove-click-body' into 'master'

Remove uses of click_body in e2e specs

See merge request gitlab-org/gitlab!24313
parents e61c8373 c6548dc3
...@@ -35,7 +35,8 @@ module QA ...@@ -35,7 +35,8 @@ module QA
def add_issue_to_epic(issue_url) def add_issue_to_epic(issue_url)
find_element(:issue_actions_split_button).find('button', text: 'Add an issue').click find_element(:issue_actions_split_button).find('button', text: 'Add an issue').click
fill_element :add_issue_input, issue_url fill_element :add_issue_input, issue_url
click_body # Clicking the title blurs the input
click_element :title
click_element :add_issue_button click_element :add_issue_button
end end
......
...@@ -255,12 +255,6 @@ module QA ...@@ -255,12 +255,6 @@ module QA
click_link text click_link text
end end
def click_body
wait_for_requests
find('body').click
end
def visit_link_in_element(name) def visit_link_in_element(name)
visit find_element(name)['href'] visit find_element(name)['href']
end end
......
...@@ -34,6 +34,10 @@ module QA ...@@ -34,6 +34,10 @@ module QA
has_css?('.select2-active', wait: 1) has_css?('.select2-active', wait: 1)
has_no_css?('.select2-active', wait: 30) has_no_css?('.select2-active', wait: 30)
end end
def dropdown_open?
has_css?('.select2-input')
end
end end
end end
end end
......
...@@ -124,7 +124,7 @@ module QA ...@@ -124,7 +124,7 @@ module QA
end end
end end
click_body click_element(:edit_link_labels)
labels.each do |label| labels.each do |label|
has_element?(:labels_block, text: label) has_element?(:labels_block, text: label)
......
...@@ -32,8 +32,7 @@ module QA ...@@ -32,8 +32,7 @@ module QA
def choose_namespace(namespace) def choose_namespace(namespace)
retry_on_exception do retry_on_exception do
click_body click_element :project_namespace_select unless dropdown_open?
click_element :project_namespace_select
search_and_select(namespace) search_and_select(namespace)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment