blob: f2ced668a605abb4bcbb37c1421f892d09cb392a (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# frozen_string_literal: true
module QA
module Page
module Project
module Settings
class CiVariables < Page::Base
include QA::Page::Settings::Common
view 'app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue' do
element :ci_variable_key_field
element :ci_variable_value_field
element :ci_variable_masked_checkbox
element :ci_variable_save_button
element :ci_variable_delete_button
end
view 'app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue' do
element :ci_variable_table_content
element :add_ci_variable_button
element :edit_ci_variable_button
element :reveal_ci_variable_value_button
end
def fill_variable(key, value, masked)
within_element(:ci_variable_key_field) { find('input').set key }
fill_element :ci_variable_value_field, value
click_ci_variable_save_button
wait_until(reload: false) do
within_element(:ci_variable_table_content) { has_element?(:edit_ci_variable_button) }
end
end
def click_add_variable
click_element :add_ci_variable_button
end
def click_edit_ci_variable
within_element(:ci_variable_table_content) do
click_element :edit_ci_variable_button
end
end
def click_ci_variable_save_button
click_element :ci_variable_save_button
end
def click_reveal_ci_variable_value_button
click_element :reveal_ci_variable_value_button
end
def click_ci_variable_delete_button
click_element :ci_variable_delete_button
end
end
end
end
end
end
|