Add prepend mod to terms_helper.rb
What does this MR do and why?
Some test cases of spec/features/users/login_spec.rb
failed on JH side
Failure/Error: expect(page).to have_content('Please accept the Terms of Service before continuing.')
expected to find text "Please accept the Terms of Service before continuing." in "Please verify your phone before continuing. These are the terms If you do not agree with these conditions, you can contact Jihu GitLab support team for helping you with your current account Phone +86 +852 +853 +886 +1 +81 +60 +61 +44 +65 +49 +7 +20 +27 +30 +31 +32 +33 +34 +36 +39 +40 +41 +43 +45 +46 +47 +48 +52 +53 +54 +55 +62 +63 +64 +66 +82 +84 +90 +91 +92 +95 +351 +352 +353 +354 +355 +356 +357 +358 +359 +370 +371 +372 +373 +374 +375 +376 +377 +378 +380 +386 +420 +421 +423 +855 +856 +880 +966 +967 +968 +971 +972 +973 +974 +976 +381 Verification code Get code Decline and sign out Accept terms"
# ./spec/support/helpers/terms_helper.rb:19:in `expect_to_be_on_terms_page'
# ./spec/features/users/login_spec.rb:817:in `block (5 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/support/redis.rb:53:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <top (required)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
So we wanna override the method expect_to_be_on_terms_page
of ./spec/support/helpers/terms_helper.rb
and we add prepend_mode
to this file.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Zehua Zhang