Update the copy in the spec
What does this MR do and why?
Fix failed job: ./jh/spec/features/users/login_spec.rb
https://jihulab.com/gitlab-cn/gitlab/-/jobs/6453414
Related Upstream MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112202
Failed log
RSpec::Retry: 2nd try ./jh/spec/features/users/login_spec.rb:31
HTML screenshot: /tmp/capybara/login_with_two-factor_authentication_when_it_not_jh_com_when_login_with_username_behaves_like_signing-in-with-two-factor_with_two-factor_enabled_requires_otp.html
Failures:
1) Login with two-factor authentication when it is JH COM when login with phone behaves like signing-in-with-two-factor with two-factor enabled requires OTP
Failure/Error: expect(page).to have_content(_('Two-factor authentication code'))
expected to find text "Two-factor authentication code" in "JiHu GitLab Enter verification code Enter the code from your two-factor authenticator app. If you've lost your device, you can enter one of your recovery codes. Verify code Explore Help About JiHu GitLab 违法和不良信息举报中心 京公网安备11010502047940号 京ICP备2021036779号-1"
Shared Example Group: "signing-in-with-two-factor" called from ./jh/spec/features/users/login_spec.rb:63
# ./jh/spec/features/users/login_spec.rb:34:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:509:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:501:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:497:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:59:in `with_raw_context'
# ./spec/spec_helper.rb:497:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:239:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
# ./jh/spec/spec_helper.rb:30:in `block (2 levels) in <main>'
2) Login with two-factor authentication when it is JH COM when login with email behaves like signing-in-with-two-factor with two-factor enabled requires OTP
Failure/Error: expect(page).to have_content(_('Two-factor authentication code'))
expected to find text "Two-factor authentication code" in "JiHu GitLab Enter verification code Enter the code from your two-factor authenticator app. If you've lost your device, you can enter one of your recovery codes. Verify code Explore Help About JiHu GitLab 违法和不良信息举报中心 京公网安备11010502047940号 京ICP备2021036779号-1"
Shared Example Group: "signing-in-with-two-factor" called from ./jh/spec/features/users/login_spec.rb:80
# ./jh/spec/features/users/login_spec.rb:34:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:509:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:501:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:497:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:59:in `with_raw_context'
# ./spec/spec_helper.rb:497:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:239:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
# ./jh/spec/spec_helper.rb:30:in `block (2 levels) in <main>'
3) Login with two-factor authentication when it is JH COM when login with username behaves like signing-in-with-two-factor with two-factor enabled requires OTP
Failure/Error: expect(page).to have_content(_('Two-factor authentication code'))
expected to find text "Two-factor authentication code" in "JiHu GitLab Enter verification code Enter the code from your two-factor authenticator app. If you've lost your device, you can enter one of your recovery codes. Verify code Explore Help About JiHu GitLab 违法和不良信息举报中心 京公网安备11010502047940号 京ICP备2021036779号-1"
Shared Example Group: "signing-in-with-two-factor" called from ./jh/spec/features/users/login_spec.rb:86
# ./jh/spec/features/users/login_spec.rb:34:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:509:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:501:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:497:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:59:in `with_raw_context'
# ./spec/spec_helper.rb:497:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:239:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
# ./jh/spec/spec_helper.rb:30:in `block (2 levels) in <main>'
4) Login with two-factor authentication when it not JH COM when login with email behaves like signing-in-with-two-factor with two-factor enabled requires OTP
Failure/Error: expect(page).to have_content(_('Two-factor authentication code'))
expected to find text "Two-factor authentication code" in "JiHu GitLab Enter verification code Enter the code from your two-factor authenticator app. If you've lost your device, you can enter one of your recovery codes. Verify code Explore Help About JiHu GitLab"
Shared Example Group: "signing-in-with-two-factor" called from ./jh/spec/features/users/login_spec.rb:109
# ./jh/spec/features/users/login_spec.rb:34:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:509:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:501:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:497:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:59:in `with_raw_context'
# ./spec/spec_helper.rb:497:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:239:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
# ./jh/spec/spec_helper.rb:30:in `block (2 levels) in <main>'
5) Login with two-factor authentication when it not JH COM when login with username behaves like signing-in-with-two-factor with two-factor enabled requires OTP
Failure/Error: expect(page).to have_content(_('Two-factor authentication code'))
expected to find text "Two-factor authentication code" in "JiHu GitLab Enter verification code Enter the code from your two-factor authenticator app. If you've lost your device, you can enter one of your recovery codes. Verify code Explore Help About JiHu GitLab"
Shared Example Group: "signing-in-with-two-factor" called from ./jh/spec/features/users/login_spec.rb:115
# ./jh/spec/features/users/login_spec.rb:34:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:509:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:18:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:501:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:497:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:59:in `with_raw_context'
# ./spec/spec_helper.rb:497:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:239:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:17:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:62:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:108:in `block (2 levels) in <main>'
# ./jh/spec/spec_helper.rb:30:in `block (2 levels) in <main>'
Finished in 10.59 seconds (files took 41.4 seconds to load)
5 examples, 5 failures
Failed examples:
rspec './jh/spec/features/users/login_spec.rb[1:1:1:1:1:1:1]' # Login with two-factor authentication when it is JH COM when login with phone behaves like signing-in-with-two-factor with two-factor enabled requires OTP
rspec './jh/spec/features/users/login_spec.rb[1:1:1:3:1:1:1]' # Login with two-factor authentication when it is JH COM when login with email behaves like signing-in-with-two-factor with two-factor enabled requires OTP
rspec './jh/spec/features/users/login_spec.rb[1:1:1:4:1:1:1]' # Login with two-factor authentication when it is JH COM when login with username behaves like signing-in-with-two-factor with two-factor enabled requires OTP
rspec './jh/spec/features/users/login_spec.rb[1:1:2:2:1:1:1]' # Login with two-factor authentication when it not JH COM when login with email behaves like signing-in-with-two-factor with two-factor enabled requires OTP
rspec './jh/spec/features/users/login_spec.rb[1:1:2:3:1:1:1]' # Login with two-factor authentication when it not JH COM when login with username behaves like signing-in-with-two-factor with two-factor enabled requires OTP
由 路志远 编辑于