mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 22:24:24 +08:00
0434112aa7
This commit includes various UX improvements to the reset password page: * Introduce a `hide-application-header-buttons` helper to do the following: * Hide Sign Up and Log In buttons, they are not necessary on this flow * Hide the sidebar, it is a distraction on this flow * Improve messaging when a 2FA confirmation is required first * Improve display of server-side ActiveRecord model validation errors in password form, e.g. instead of "is the same as your current password" we do "The password is the same as your current password" * Move password tip to next line below input and move caps lock hint inline with Show/Hide password toggle * Add system specs for 2FA flow on reset password page * Fixes a computed property conflict issue on the password reset page when toggling 2FA methods
23 lines
713 B
Ruby
23 lines
713 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Legacy Widget Header", type: :system do
|
|
before { SiteSetting.glimmer_header_mode = "disabled" }
|
|
|
|
context "when resetting password" do
|
|
fab!(:current_user) { Fabricate(:user) }
|
|
|
|
it "does not show search, login, or signup buttons" do
|
|
email_token =
|
|
current_user.email_tokens.create!(
|
|
email: current_user.email,
|
|
scope: EmailToken.scopes[:password_reset],
|
|
)
|
|
|
|
visit "/u/password-reset/#{email_token.token}"
|
|
expect(page).not_to have_css("button.login-button")
|
|
expect(page).not_to have_css("button.sign-up-button")
|
|
expect(page).not_to have_css(".search-dropdown #search-button")
|
|
end
|
|
end
|
|
end
|