Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d07967d4
Commit
d07967d4
authored
Sep 30, 2021
by
Dan Davison
Committed by
Sanad Liaquat
Sep 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update login library to include term acceptance
parent
53ccd25f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
6 deletions
+104
-6
qa/Gemfile
qa/Gemfile
+1
-1
qa/Gemfile.lock
qa/Gemfile.lock
+2
-2
qa/chemlab-library-gitlab.gemspec
qa/chemlab-library-gitlab.gemspec
+2
-2
qa/lib/gitlab/page/main/login.rb
qa/lib/gitlab/page/main/login.rb
+17
-1
qa/lib/gitlab/page/main/login.stub.rb
qa/lib/gitlab/page/main/login.stub.rb
+82
-0
No files found.
qa/Gemfile
View file @
d07967d4
...
...
@@ -26,7 +26,7 @@ gem 'webdrivers', '~> 4.6'
gem
'zeitwerk'
,
'~> 2.4'
gem
'influxdb-client'
,
'~> 1.17'
gem
'chemlab'
,
'~> 0.
8
'
gem
'chemlab'
,
'~> 0.
9
'
gem
'chemlab-library-www-gitlab-com'
,
'~> 0.1'
gem
'deprecation_toolkit'
,
'~> 1.5.1'
,
require:
false
...
...
qa/Gemfile.lock
View file @
d07967d4
...
...
@@ -41,7 +41,7 @@ GEM
capybara-screenshot (1.0.23)
capybara (>= 1.0, < 4)
launchy
chemlab (0.
8
.1)
chemlab (0.
9
.1)
colorize (~> 0.8)
i18n (~> 1.8)
rake (>= 12, < 14)
...
...
@@ -244,7 +244,7 @@ DEPENDENCIES
allure-rspec (~> 2.14.5)
capybara (~> 3.35.0)
capybara-screenshot (~> 1.0.23)
chemlab (~> 0.
8
)
chemlab (~> 0.
9
)
chemlab-library-www-gitlab-com (~> 0.1)
deprecation_toolkit (~> 1.5.1)
faker (~> 2.19, >= 2.19.0)
...
...
qa/chemlab-library-gitlab.gemspec
View file @
d07967d4
...
...
@@ -4,7 +4,7 @@ $:.unshift(File.expand_path('lib', __dir__))
Gem
::
Specification
.
new
do
|
spec
|
spec
.
name
=
'chemlab-library-gitlab'
spec
.
version
=
'0.
2
.0'
spec
.
version
=
'0.
3
.0'
spec
.
authors
=
[
'GitLab Quality'
]
spec
.
email
=
[
'quality@gitlab.com'
]
...
...
@@ -18,5 +18,5 @@ Gem::Specification.new do |spec|
spec
.
require_paths
=
[
'lib'
]
spec
.
add_runtime_dependency
'chemlab'
,
'~> 0.
8
'
spec
.
add_runtime_dependency
'chemlab'
,
'~> 0.
9
'
end
qa/lib/gitlab/page/main/login.rb
View file @
d07967d4
...
...
@@ -10,11 +10,27 @@ module Gitlab
text_field
:password_field
button
:sign_in_button
def
sign_in_as
(
username
:,
password
:)
button
:accept_terms
,
text:
'Accept terms'
# password change tab
text_field
:password_confirmation_field
button
:change_password_button
# Sign in using a given username and password
# @note this will also automatically accept terms if prompted
# @param [String] username the username to sign in with
# @param [String] password the password to sign in with
# @example
# Page::Main::Login.perform do |login|
# login.sign_in_as(username: 'username', password: 'password')
# login.sign_in_as(username: 'username', password: 'password', accept_terms: false)
# end
def
sign_in_as
(
username
:,
password
:,
accept_terms:
true
)
self
.
login_field
=
username
self
.
password_field
=
password
sign_in_button
self
.
accept_terms
if
accept_terms
&&
accept_terms?
end
end
end
...
...
qa/lib/gitlab/page/main/login.stub.rb
View file @
d07967d4
...
...
@@ -95,6 +95,88 @@ module Gitlab
def
sign_in_button?
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +button :accept_terms+
# Clicks +accept_terms+
def
accept_terms
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Main::Login.perform do |login|
# expect(login.accept_terms_element).to exist
# end
# @return [Watir::Button] The raw +Button+ element
def
accept_terms_element
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Main::Login.perform do |login|
# expect(login).to be_accept_terms
# end
# @return [Boolean] true if the +accept_terms+ element is present on the page
def
accept_terms?
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +text_field :password_confirmation_field+
# @return [String] The text content or value of +password_confirmation_field+
def
password_confirmation_field
# This is a stub, used for indexing. The method is dynamically generated.
end
# Set the value of password_confirmation_field
# @example
# Gitlab::Page::Main::Login.perform do |login|
# login.password_confirmation_field = 'value'
# end
# @param value [String] The value to set.
def
password_confirmation_field
=
(
value
)
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Main::Login.perform do |login|
# expect(login.password_confirmation_field_element).to exist
# end
# @return [Watir::TextField] The raw +TextField+ element
def
password_confirmation_field_element
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Main::Login.perform do |login|
# expect(login).to be_password_confirmation_field
# end
# @return [Boolean] true if the +password_confirmation_field+ element is present on the page
def
password_confirmation_field?
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +button :change_password_button+
# Clicks +change_password_button+
def
change_password_button
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Main::Login.perform do |login|
# expect(login.change_password_button_element).to exist
# end
# @return [Watir::Button] The raw +Button+ element
def
change_password_button_element
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Main::Login.perform do |login|
# expect(login).to be_change_password_button
# end
# @return [Boolean] true if the +change_password_button+ element is present on the page
def
change_password_button?
# This is a stub, used for indexing. The method is dynamically generated.
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment