-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create One Login bridging page #968
Changes from all commits
5af4ec3
0c96676
adaa702
226345e
8410f8f
b7a8ff5
385e30a
2cf7064
784f116
7b776be
9765caf
6d74e30
65a4a22
f262a40
e17b30e
391c35b
2b4f1a5
208c212
3b7ba6a
b556ac3
0c6fa46
93923c3
948fa98
932ba80
9c8bdda
a21cd78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
class GovOneController < ApplicationController | ||
def info; end | ||
layout 'hero' | ||
|
||
def show | ||
redirect_to my_modules_path if current_user | ||
end | ||
end |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
- content_for :page_title do | ||
= html_title t('home.title') | ||
|
||
- content_for :hero do | ||
.govuk-grid-row class='govuk-!-padding-top-9' | ||
.govuk-grid-column-three-quarters | ||
h1.dfe-heading-xl class='govuk-!-margin-bottom-4' | ||
= t('gov_one_info.hero.header') | ||
p.govuk-body-l = t('gov_one_info.hero.body') | ||
|
||
|
||
.govuk-grid-row | ||
.govuk-grid-column-full | ||
. class='govuk-!-margin-bottom-5' | ||
= m('gov_one_info.body') | ||
hr | ||
|
||
= login_button | ||
|
||
.govuk-grid-row | ||
.govuk-grid-column-three-quarters class='govuk-!-margin-top-4 govuk-!-margin-bottom-9' | ||
details.govuk-details data-module='govuk-details' | ||
summary.govuk-details__summary | ||
span.govuk-details__summary-text | ||
= t('gov_one_info.details_summary') | ||
.govuk-details__text | ||
= t('gov_one_info.details_text') | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
svg.govuk-button__start-icon xmlns='http://www.w3.org/2000/svg' width='17.5' height='19' viewBox='0 0 33 40' aria-hidden='true' focusable='false' | ||
path fill='currentColor' d='M0 0h13l20 20-20 20H0l20-20z' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,20 +11,17 @@ | |
.govuk-grid-column-one-half | ||
= m('home.about', headings_start_with: 'xl') | ||
|
||
- unless current_user | ||
.govuk-grid-column-one-half | ||
.light-grey-box.enrol-box | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, deleted now |
||
= m('home.login', headings_start_with: 'xl') | ||
|
||
.govuk-button-group | ||
= govuk_button_link_to 'Sign in', new_user_session_path | ||
.white-space-pre-wrap= ' or ' | ||
= govuk_link_to 'create an account', new_user_registration_path | ||
|
||
.prompt.prompt-home | ||
.govuk-grid-row | ||
.govuk-grid-column-one-quarter | ||
i.fa-2x.fa-solid.fa-circle-info aria-describedby='info icon' | ||
|
||
.govuk-grid-column-three-quarters | ||
= m('home.prompt', headings_start_with: 'xl') | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure of the syntax here but your HTML contains an empty div that is adding spacing. For cleanliness it needs removing - The button at the bottom should be in the grid as follows: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, thanks there was a div left over from the old design that I hadn't deleted |
||
- unless current_user | ||
.govuk-grid-row class="govuk-!-margin-top-9" | ||
.govuk-grid-column-full | ||
= govuk_button_link_to gov_one_info_path, class: "govuk-button--start" do | ||
| #{t('home.gov_one_button')} | ||
= render 'chevron' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe 'Gov One Info' do | ||
before do | ||
allow(Rails.application).to receive(:gov_one_login?).and_return(false) | ||
visit '/gov-one/info' | ||
end | ||
|
||
context 'with an unauthenticated visitor' do | ||
it 'displays the correct content' do | ||
expect(page).to have_css('h1', text: 'How to access this training course') | ||
expect(page).to have_css('p', text: 'This service uses GOV.UK One Login which is managed by the Government Digital Service.') | ||
expect(page).to have_css('p', text: 'You will be asked to sign in to your account, or create a One Login account, in this service') | ||
expect(page).to have_css('a', text: 'Continue to GOV.UK One Login') | ||
end | ||
end | ||
|
||
context 'with an authenticated user' do | ||
include_context 'with user' | ||
|
||
it 'redirects to the my modules page' do | ||
expect(page).to have_current_path('/my-modules') | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we also removing the locale/resource? Again, if there are multiple button keys, we can nest them (flips how you read it).