summaryrefslogtreecommitdiff
path: root/qa/qa/page/profile/ssh_keys.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/profile/ssh_keys.rb')
-rw-r--r--qa/qa/page/profile/ssh_keys.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/qa/qa/page/profile/ssh_keys.rb b/qa/qa/page/profile/ssh_keys.rb
index 810877e21ad..8da484003f4 100644
--- a/qa/qa/page/profile/ssh_keys.rb
+++ b/qa/qa/page/profile/ssh_keys.rb
@@ -11,8 +11,9 @@ module QA
element :add_key_button
end
- view 'app/views/profiles/keys/_key_details.html.haml' do
- element :delete_key_button
+ view 'app/helpers/ssh_keys_helper.rb' do
+ element :delete_ssh_key_button
+ element :ssh_key_delete_modal
end
view 'app/views/profiles/keys/_key_table.html.haml' do
@@ -38,8 +39,14 @@ module QA
def remove_key(title)
click_link(title)
- accept_alert do
- click_element(:delete_key_button)
+ click_element(:delete_ssh_key_button)
+
+ # Retrying due to https://gitlab.com/gitlab-org/gitlab/-/issues/255287
+ retry_on_exception do
+ wait_for_animated_element(:ssh_key_delete_modal)
+ within_element(:ssh_key_delete_modal) do
+ click_button('Delete')
+ end
end
end