blob: 5a908266597c72cb12969e1a8f4e2ead24a864a4 (
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
|
# frozen_string_literal: true
module QA
module Page
module Group
class New < Page::Base
include Page::Component::VisibilitySetting
view 'app/views/shared/_group_form.html.haml' do
element :group_path_field
element :group_name_field
end
view 'app/views/groups/_new_group_fields.html.haml' do
element :create_group_button, "submit _('Create group')" # rubocop:disable QA/ElementWithPattern
end
view 'app/views/groups/_import_group_from_another_instance_panel.html.haml' do
element :import_gitlab_url
element :import_gitlab_token
element :connect_instance_button
end
def set_path(path)
fill_element(:group_path_field, path)
fill_element(:group_name_field, path)
end
def create
click_button 'Create group'
end
def set_gitlab_url(url)
fill_element(:import_gitlab_url, url)
end
def set_gitlab_token(token)
fill_element(:import_gitlab_token, token)
end
# Connect gitlab instance
#
# @param [String] gitlab_url
# @param [String] gitlab_token
# @return [void]
def connect_gitlab_instance(gitlab_url, gitlab_token)
set_gitlab_url(gitlab_url)
set_gitlab_token(gitlab_token)
click_element(:connect_instance_button)
end
end
end
end
end
|