Skip to content

Commit

Permalink
LG-14290- Add step indicator to How To Verify View (#11298)
Browse files Browse the repository at this point in the history
* Add step indicator to how to verify view

* changelog: User-Facing Improvements, In-person proofing, Add step indicator to how to verify view
  • Loading branch information
gina-yamada authored Oct 3, 2024
1 parent 9ceb21a commit 9a81e19
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/views/idv/how_to_verify/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<% content_for(:pre_flash_content) do %>
<%= render StepIndicatorComponent.new(
steps: Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS,
current_step: :getting_started,
locale_scope: 'idv',
class: 'margin-x-neg-2 margin-top-neg-4 tablet:margin-x-neg-6 tablet:margin-top-neg-4',
) %>
<% end %>

<% self.title = t('doc_auth.headings.how_to_verify') %>

<%= render PageHeadingComponent.new.with_content(t('doc_auth.headings.how_to_verify')) %>

<% if defined?(error) %>
Expand Down
7 changes: 7 additions & 0 deletions spec/views/idv/agreement/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
expect(rendered).to have_css(selector)
end

it 'renders a step indicator with Getting started as the current step' do
expect(view.content_for(:pre_flash_content)).to have_css(
'.step-indicator__step--current',
text: t('step_indicator.flows.idv.getting_started'),
)
end

it 'renders a link to the privacy & security page' do
expect(rendered).to have_link(
t('doc_auth.instructions.learn_more'),
Expand Down
14 changes: 14 additions & 0 deletions spec/views/idv/how_to_verify/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
end

context 'renders the show template with' do
it('a step indicator with Getting started as the current step') do
expect(view.content_for(:pre_flash_content)).to have_css(
'.step-indicator__step--current',
text: t('step_indicator.flows.idv.getting_started'),
)
end

it 'a title' do
expect(rendered).to have_content(t('doc_auth.headings.how_to_verify'))
end
Expand Down Expand Up @@ -65,6 +72,13 @@
end

context 'renders the show template with' do
it('a step indicator with Getting started as the current step') do
expect(view.content_for(:pre_flash_content)).to have_css(
'.step-indicator__step--current',
text: t('step_indicator.flows.idv.getting_started'),
)
end

it 'a title' do
expect(rendered).to have_content(t('doc_auth.headings.how_to_verify'))
end
Expand Down

0 comments on commit 9a81e19

Please sign in to comment.