Commit fa185207 authored by Anastasia McDonald's avatar Anastasia McDonald

Fix flaky snippet tests

After clicking Delete button we need to add wait
for the page to reload and the snippet to disappear
parent 5b6fafe9
...@@ -83,7 +83,11 @@ module QA ...@@ -83,7 +83,11 @@ module QA
finished_loading? finished_loading?
click_element(:snippet_action_button, action: 'Delete') click_element(:snippet_action_button, action: 'Delete')
click_element(:delete_snippet_button) click_element(:delete_snippet_button)
finished_loading? # wait for the page to reload after deletion # wait for the page to reload after deletion
wait_until(reload: false) do
has_no_element?(:delete_snippet_button) &&
has_no_element?(:snippet_action_button, action: 'Delete')
end
end end
def get_repository_uri_http def get_repository_uri_http
......
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