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
04565a60
Commit
04565a60
authored
Oct 01, 2021
by
Sanad Liaquat (Personal)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set user password when enabling 2FA
parent
9f661a90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
0 deletions
+8
-0
qa/qa/page/profile/two_factor_auth.rb
qa/qa/page/profile/two_factor_auth.rb
+5
-0
qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
...s/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
+1
-0
qa/qa/specs/features/browser_ui/1_manage/login/2fa_ssh_recovery_spec.rb
...atures/browser_ui/1_manage/login/2fa_ssh_recovery_spec.rb
+1
-0
qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
...eatures/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
+1
-0
No files found.
qa/qa/page/profile/two_factor_auth.rb
View file @
04565a60
...
...
@@ -11,6 +11,7 @@ module QA
view
'app/views/profiles/two_factor_auths/show.html.haml'
do
element
:otp_secret_content
element
:pin_code_field
element
:current_password_field
element
:register_2fa_app_button
end
...
...
@@ -33,6 +34,10 @@ module QA
fill_element
(
:pin_code_field
,
pin_code
)
end
def
set_current_password
(
password
)
fill_element
(
:current_password_field
,
password
)
end
def
click_register_2fa_app_button
click_element
:register_2fa_app_button
end
...
...
qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
View file @
04565a60
...
...
@@ -78,6 +78,7 @@ module QA
@otp
=
QA
::
Support
::
OTP
.
new
(
two_fa_auth
.
otp_secret_content
)
two_fa_auth
.
set_pin_code
(
@otp
.
fresh_otp
)
two_fa_auth
.
set_current_password
(
user
.
password
)
two_fa_auth
.
click_register_2fa_app_button
recovery_code
=
two_fa_auth
.
recovery_codes
.
sample
...
...
qa/qa/specs/features/browser_ui/1_manage/login/2fa_ssh_recovery_spec.rb
View file @
04565a60
...
...
@@ -55,6 +55,7 @@ module QA
Page
::
Profile
::
TwoFactorAuth
.
perform
do
|
two_fa_auth
|
otp
=
QA
::
Support
::
OTP
.
new
(
two_fa_auth
.
otp_secret_content
)
two_fa_auth
.
set_pin_code
(
otp
.
fresh_otp
)
two_fa_auth
.
set_current_password
(
user
.
password
)
two_fa_auth
.
click_register_2fa_app_button
two_fa_auth
.
click_copy_and_proceed
end
...
...
qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
View file @
04565a60
...
...
@@ -98,6 +98,7 @@ module QA
@otp
=
QA
::
Support
::
OTP
.
new
(
two_fa_auth
.
otp_secret_content
)
two_fa_auth
.
set_pin_code
(
@otp
.
fresh_otp
)
two_fa_auth
.
set_current_password
(
user
.
password
)
two_fa_auth
.
click_register_2fa_app_button
two_fa_auth
.
click_copy_and_proceed
...
...
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