Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ER 887 Account Page #977

Merged
merged 5 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ ul>li>ul>li {
.white-space-pre-wrap {
white-space: pre-wrap;
}

.text-secondary {
color: $govuk-secondary-text-colour;
}
12 changes: 3 additions & 9 deletions app/views/user/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@
.govuk-grid-column-full
h1.govuk-heading-l Manage your account
h2.govuk-heading-m Your details
hr.govuk-section-break.govuk-section-break--l.govuk-section-break--visible
hr.govuk-section-break.govuk-section-break--l.govuk-section-break--visible class="govuk-!-margin-bottom-0"

= govuk_summary_list do |your_details|
- your_details.with_row do |row|
- row.with_key { 'Name' }
- row.with_value(text: current_user.name, classes: %w[data-hj-suppress])
- row.with_action(text: 'Change name', href: edit_registration_name_path, html_attributes: { id: :edit_name_registration })
- your_details.with_row do |row|
- row.with_key { 'Email' }
- row.with_value(text:current_user.email, classes: %w[data-hj-suppress])
- row.with_action(text: 'Change email', href: edit_email_user_path, html_attributes: { id: :edit_email_user })
- your_details.with_row do |row|
- row.with_key { 'Password' }
- row.with_value { t('my_account.password_changed', date: current_user.password_last_changed) }
- row.with_action(text: 'Change password', href: edit_password_user_path, html_attributes: { id: :edit_password_user })
p.text-secondary
= t('my_account.name_information')

= govuk_summary_list do |other_details|
- other_details.with_row do |row|
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ en:
# /my-account
my_account:
title: My account
name_information: This is the name that will appear on you end of module certificate. You can use this setting to change how your name appears. Changing your name on this account will not affect your GOV.UK One Login account.
setting_details: |
## Your setting details
email_preferences: |
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/seed_snippets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
subject(:locales) { described_class.new.call }

it 'converts all translations' do
expect(locales.count).to be 191
expect(locales.count).to be 192
end

it 'dot separated key -> Page::Resource#name' do
Expand Down
5 changes: 3 additions & 2 deletions spec/requests/bot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

RSpec.describe 'Automated bot', type: :request do
let(:bot_email) { '[email protected]' }
let(:bot_name) { 'Bot' }

before do
create :user, :registered, email: bot_email
create :user, :registered, email: bot_email, first_name: bot_name
end

context 'with header' do
Expand All @@ -14,7 +15,7 @@

it 'is not redirected and can access secure pages' do
expect(response).not_to redirect_to new_user_session_path
expect(response.body).to include bot_email
expect(response.body).to include bot_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What makes this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterdavidhamilton Email is no longer displayed on account page, so using the name to identify the user in this case instead

end
end

Expand Down
55 changes: 0 additions & 55 deletions spec/system/registered_user/changing_password_spec.rb

This file was deleted.

Loading