chemlab-library-gitlab 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d616d61c7d9c2037218a949263ef2d12c82641ed72adbc7c49f61ff715a6b868
4
- data.tar.gz: f27a739c4e6a877ca73e5e04627abdf0591c1c1e828f492f222e3195105855af
3
+ metadata.gz: 2b4e2b3946fef05633847245425614d5004e72cdd241603bd2fcbc86a4ce3ee4
4
+ data.tar.gz: 6adf3cef1ec62d576269e7b78c7ff4bf541d433c8dc0e84fdd81c4b3c026523b
5
5
  SHA512:
6
- metadata.gz: 30a390cb9a2f3d9d7de93a8d773acf443be51977712f22e9e95566ba9d23f769c4c6f79b9abedbbf09db4907cbc13000ae75dd43b1644a1a355dbc7fa1293620
7
- data.tar.gz: be6505bc4a3f67cab9fec646a5b5f8a6230bd2e5eff402778bf8a5c3e5f65ca3376b3e74177ffcf52319c52631c7943431dfad815f8580a3fca126252312e5c2
6
+ metadata.gz: 5954531be7647ef9983d3f06f174e478f54c2a427016be7f188bcb5b9e718657e72b25781f13066ed105de94d4b4fd5fed792eb521164c86e1b6b805298f90f8
7
+ data.tar.gz: 49c2ef0e20512e996b052d019696d677f2f30361e21fc018698193dd0f10e02624bbe18edf11b3c48ea8c4c8f485921bf6b1b50dcf1222c8d48db98680c29c89
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module Page
5
+ module Admin
6
+ class Dashboard < Chemlab::Page
7
+ path '/admin'
8
+
9
+ h2 :users_in_license
10
+ h2 :billable_users
11
+ h3 :number_of_users
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module Page
5
+ module Admin
6
+ module Dashboard
7
+ # @note Defined as +h2 :users_in_license+
8
+ # @return [String] The text content or value of +users_in_license+
9
+ def users_in_license
10
+ # This is a stub, used for indexing. The method is dynamically generated.
11
+ end
12
+
13
+ # @example
14
+ # Gitlab::Page::Admin::Dashboard.perform do |dashboard|
15
+ # expect(dashboard.users_in_license_element).to exist
16
+ # end
17
+ # @return [Watir::H2] The raw +H2+ element
18
+ def users_in_license_element
19
+ # This is a stub, used for indexing. The method is dynamically generated.
20
+ end
21
+
22
+ # @example
23
+ # Gitlab::Page::Admin::Dashboard.perform do |dashboard|
24
+ # expect(dashboard).to be_users_in_license
25
+ # end
26
+ # @return [Boolean] true if the +users_in_license+ element is present on the page
27
+ def users_in_license?
28
+ # This is a stub, used for indexing. The method is dynamically generated.
29
+ end
30
+
31
+ # @note Defined as +h2 :billable_users+
32
+ # @return [String] The text content or value of +billable_users+
33
+ def billable_users
34
+ # This is a stub, used for indexing. The method is dynamically generated.
35
+ end
36
+
37
+ # @example
38
+ # Gitlab::Page::Admin::Dashboard.perform do |dashboard|
39
+ # expect(dashboard.billable_users_element).to exist
40
+ # end
41
+ # @return [Watir::H2] The raw +H2+ element
42
+ def billable_users_element
43
+ # This is a stub, used for indexing. The method is dynamically generated.
44
+ end
45
+
46
+ # @example
47
+ # Gitlab::Page::Admin::Dashboard.perform do |dashboard|
48
+ # expect(dashboard).to be_billable_users
49
+ # end
50
+ # @return [Boolean] true if the +billable_users+ element is present on the page
51
+ def billable_users?
52
+ # This is a stub, used for indexing. The method is dynamically generated.
53
+ end
54
+
55
+ # @note Defined as +h3 :number_of_users+
56
+ # @return [String] The text content or value of +number_of_users+
57
+ def number_of_users
58
+ # This is a stub, used for indexing. The method is dynamically generated.
59
+ end
60
+
61
+ # @example
62
+ # Gitlab::Page::Admin::Dashboard.perform do |dashboard|
63
+ # expect(dashboard.number_of_users_element).to exist
64
+ # end
65
+ # @return [Watir::H3] The raw +H3+ element
66
+ def number_of_users_element
67
+ # This is a stub, used for indexing. The method is dynamically generated.
68
+ end
69
+
70
+ # @example
71
+ # Gitlab::Page::Admin::Dashboard.perform do |dashboard|
72
+ # expect(dashboard).to be_number_of_users
73
+ # end
74
+ # @return [Boolean] true if the +number_of_users+ element is present on the page
75
+ def number_of_users?
76
+ # This is a stub, used for indexing. The method is dynamically generated.
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module Page
5
+ module Admin
6
+ class Subscription < Chemlab::Page
7
+ path '/admin/subscription'
8
+
9
+ h2 :users_in_subscription
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module Page
5
+ module Admin
6
+ module Subscription
7
+ # @note Defined as +h2 :users_in_subscription+
8
+ # @return [String] The text content or value of +users_in_subscription+
9
+ def users_in_subscription
10
+ # This is a stub, used for indexing. The method is dynamically generated.
11
+ end
12
+
13
+ # @example
14
+ # Gitlab::Page::Admin::Subscription.perform do |subscription|
15
+ # expect(subscription.users_in_subscription_element).to exist
16
+ # end
17
+ # @return [Watir::H2] The raw +H2+ element
18
+ def users_in_subscription_element
19
+ # This is a stub, used for indexing. The method is dynamically generated.
20
+ end
21
+
22
+ # @example
23
+ # Gitlab::Page::Admin::Subscription.perform do |subscription|
24
+ # expect(subscription).to be_users_in_subscription
25
+ # end
26
+ # @return [Boolean] true if the +users_in_subscription+ element is present on the page
27
+ def users_in_subscription?
28
+ # This is a stub, used for indexing. The method is dynamically generated.
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module Page
5
+ module Main
6
+ class SignUp < Chemlab::Page
7
+ path '/users/sign_up'
8
+
9
+ # TODO: Refactor data-qa-selectors to be more terse
10
+ text_field :first_name, 'data-qa-selector': 'new_user_first_name_field'
11
+ text_field :last_name, 'data-qa-selector': 'new_user_last_name_field'
12
+
13
+ text_field :username, 'data-qa-selector': 'new_user_username_field'
14
+
15
+ text_field :email, 'data-qa-selector': 'new_user_email_field'
16
+ text_field :password, 'data-qa-selector': 'new_user_password_field'
17
+
18
+ button :register, 'data-qa-selector': 'new_user_register_button'
19
+
20
+ # Register a user
21
+ # @param [Resource::User] user the user to register
22
+ def register_user(user)
23
+ raise ArgumentError, 'User must be of type Resource::User' unless user.is_a? ::QA::Resource::User
24
+
25
+ self.first_name = user.first_name
26
+ self.last_name = user.last_name
27
+ self.username = user.username
28
+ self.email = user.email
29
+ self.password = user.password
30
+
31
+ self.register
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,203 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module Page
5
+ module Main
6
+ module SignUp
7
+ # @note Defined as +text_field :first_name+
8
+ # @return [String] The text content or value of +first_name+
9
+ def first_name
10
+ # This is a stub, used for indexing. The method is dynamically generated.
11
+ end
12
+
13
+ # Set the value of first_name
14
+ # @example
15
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
16
+ # sign_up.first_name = 'value'
17
+ # end
18
+ # @param value [String] The value to set.
19
+ def first_name=(value)
20
+ # This is a stub, used for indexing. The method is dynamically generated.
21
+ end
22
+
23
+ # @example
24
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
25
+ # expect(sign_up.first_name_element).to exist
26
+ # end
27
+ # @return [Watir::TextField] The raw +TextField+ element
28
+ def first_name_element
29
+ # This is a stub, used for indexing. The method is dynamically generated.
30
+ end
31
+
32
+ # @example
33
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
34
+ # expect(sign_up).to be_first_name
35
+ # end
36
+ # @return [Boolean] true if the +first_name+ element is present on the page
37
+ def first_name?
38
+ # This is a stub, used for indexing. The method is dynamically generated.
39
+ end
40
+
41
+ # @note Defined as +text_field :last_name+
42
+ # @return [String] The text content or value of +last_name+
43
+ def last_name
44
+ # This is a stub, used for indexing. The method is dynamically generated.
45
+ end
46
+
47
+ # Set the value of last_name
48
+ # @example
49
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
50
+ # sign_up.last_name = 'value'
51
+ # end
52
+ # @param value [String] The value to set.
53
+ def last_name=(value)
54
+ # This is a stub, used for indexing. The method is dynamically generated.
55
+ end
56
+
57
+ # @example
58
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
59
+ # expect(sign_up.last_name_element).to exist
60
+ # end
61
+ # @return [Watir::TextField] The raw +TextField+ element
62
+ def last_name_element
63
+ # This is a stub, used for indexing. The method is dynamically generated.
64
+ end
65
+
66
+ # @example
67
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
68
+ # expect(sign_up).to be_last_name
69
+ # end
70
+ # @return [Boolean] true if the +last_name+ element is present on the page
71
+ def last_name?
72
+ # This is a stub, used for indexing. The method is dynamically generated.
73
+ end
74
+
75
+ # @note Defined as +text_field :username+
76
+ # @return [String] The text content or value of +username+
77
+ def username
78
+ # This is a stub, used for indexing. The method is dynamically generated.
79
+ end
80
+
81
+ # Set the value of username
82
+ # @example
83
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
84
+ # sign_up.username = 'value'
85
+ # end
86
+ # @param value [String] The value to set.
87
+ def username=(value)
88
+ # This is a stub, used for indexing. The method is dynamically generated.
89
+ end
90
+
91
+ # @example
92
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
93
+ # expect(sign_up.username_element).to exist
94
+ # end
95
+ # @return [Watir::TextField] The raw +TextField+ element
96
+ def username_element
97
+ # This is a stub, used for indexing. The method is dynamically generated.
98
+ end
99
+
100
+ # @example
101
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
102
+ # expect(sign_up).to be_username
103
+ # end
104
+ # @return [Boolean] true if the +username+ element is present on the page
105
+ def username?
106
+ # This is a stub, used for indexing. The method is dynamically generated.
107
+ end
108
+
109
+ # @note Defined as +text_field :email+
110
+ # @return [String] The text content or value of +email+
111
+ def email
112
+ # This is a stub, used for indexing. The method is dynamically generated.
113
+ end
114
+
115
+ # Set the value of email
116
+ # @example
117
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
118
+ # sign_up.email = 'value'
119
+ # end
120
+ # @param value [String] The value to set.
121
+ def email=(value)
122
+ # This is a stub, used for indexing. The method is dynamically generated.
123
+ end
124
+
125
+ # @example
126
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
127
+ # expect(sign_up.email_element).to exist
128
+ # end
129
+ # @return [Watir::TextField] The raw +TextField+ element
130
+ def email_element
131
+ # This is a stub, used for indexing. The method is dynamically generated.
132
+ end
133
+
134
+ # @example
135
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
136
+ # expect(sign_up).to be_email
137
+ # end
138
+ # @return [Boolean] true if the +email+ element is present on the page
139
+ def email?
140
+ # This is a stub, used for indexing. The method is dynamically generated.
141
+ end
142
+
143
+ # @note Defined as +text_field :password+
144
+ # @return [String] The text content or value of +password+
145
+ def password
146
+ # This is a stub, used for indexing. The method is dynamically generated.
147
+ end
148
+
149
+ # Set the value of password
150
+ # @example
151
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
152
+ # sign_up.password = 'value'
153
+ # end
154
+ # @param value [String] The value to set.
155
+ def password=(value)
156
+ # This is a stub, used for indexing. The method is dynamically generated.
157
+ end
158
+
159
+ # @example
160
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
161
+ # expect(sign_up.password_element).to exist
162
+ # end
163
+ # @return [Watir::TextField] The raw +TextField+ element
164
+ def password_element
165
+ # This is a stub, used for indexing. The method is dynamically generated.
166
+ end
167
+
168
+ # @example
169
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
170
+ # expect(sign_up).to be_password
171
+ # end
172
+ # @return [Boolean] true if the +password+ element is present on the page
173
+ def password?
174
+ # This is a stub, used for indexing. The method is dynamically generated.
175
+ end
176
+
177
+ # @note Defined as +button :register+
178
+ # Clicks +register+
179
+ def register
180
+ # This is a stub, used for indexing. The method is dynamically generated.
181
+ end
182
+
183
+ # @example
184
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
185
+ # expect(sign_up.register_element).to exist
186
+ # end
187
+ # @return [Watir::Button] The raw +Button+ element
188
+ def register_element
189
+ # This is a stub, used for indexing. The method is dynamically generated.
190
+ end
191
+
192
+ # @example
193
+ # Gitlab::Page::Main::SignUp.perform do |sign_up|
194
+ # expect(sign_up).to be_register
195
+ # end
196
+ # @return [Boolean] true if the +register+ element is present on the page
197
+ def register?
198
+ # This is a stub, used for indexing. The method is dynamically generated.
199
+ end
200
+ end
201
+ end
202
+ end
203
+ end
data/lib/gitlab.rb CHANGED
@@ -5,12 +5,18 @@ module Gitlab
5
5
  module Page
6
6
  module Main
7
7
  autoload :Login, 'gitlab/page/main/login'
8
+ autoload :SignUp, 'gitlab/page/main/sign_up'
8
9
  end
9
10
 
10
11
  module Subscriptions
11
12
  autoload :New, 'gitlab/page/subscriptions/new'
12
13
  end
13
14
 
15
+ module Admin
16
+ autoload :Dashboard, 'gitlab/page/admin/dashboard'
17
+ autoload :Subscription, 'gitlab/page/admin/subscription'
18
+ end
19
+
14
20
  module Group
15
21
  module Settings
16
22
  autoload :Billing, 'gitlab/page/group/settings/billing'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chemlab-library-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-27 00:00:00.000000000 Z
11
+ date: 2021-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chemlab
@@ -32,10 +32,16 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - lib/gitlab.rb
35
+ - lib/gitlab/page/admin/dashboard.rb
36
+ - lib/gitlab/page/admin/dashboard.stub.rb
37
+ - lib/gitlab/page/admin/subscription.rb
38
+ - lib/gitlab/page/admin/subscription.stub.rb
35
39
  - lib/gitlab/page/group/settings/billing.rb
36
40
  - lib/gitlab/page/group/settings/billing.stub.rb
37
41
  - lib/gitlab/page/main/login.rb
38
42
  - lib/gitlab/page/main/login.stub.rb
43
+ - lib/gitlab/page/main/sign_up.rb
44
+ - lib/gitlab/page/main/sign_up.stub.rb
39
45
  - lib/gitlab/page/subscriptions/new.rb
40
46
  - lib/gitlab/page/subscriptions/new.stub.rb
41
47
  homepage: https://gitlab.com/
@@ -50,14 +56,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
56
  requirements:
51
57
  - - ">="
52
58
  - !ruby/object:Gem::Version
53
- version: '0'
59
+ version: '2.5'
54
60
  required_rubygems_version: !ruby/object:Gem::Requirement
55
61
  requirements:
56
62
  - - ">="
57
63
  - !ruby/object:Gem::Version
58
64
  version: '0'
59
65
  requirements: []
60
- rubygems_version: 3.1.4
66
+ rubygems_version: 3.1.6
61
67
  signing_key:
62
68
  specification_version: 4
63
69
  summary: Chemlab Page Libraries for GitLab