blob: 4d1cf30c392488fa9b29ea050a8442a931c3a672 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# frozen_string_literal: true
module QA
module Page
module Component
module ConfirmModal
extend QA::Page::PageConcern
def self.included(base)
super
base.view 'app/assets/javascripts/lib/utils/confirm_via_gl_modal/confirm_modal.vue' do
element :confirm_ok_button
end
base.view 'app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue' do
element :confirm_danger_modal_button
element :confirm_danger_field
end
end
def fill_confirmation_text(text)
fill_element(:confirm_danger_field, text)
end
def wait_for_confirm_button_enabled
wait_until(reload: false) do
!find_element(:confirm_danger_modal_button).disabled?
end
end
def confirm_transfer
wait_for_confirm_button_enabled
click_element(:confirm_danger_modal_button)
end
def click_confirmation_ok_button
click_element(:confirm_ok_button)
end
end
end
end
end
|