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

LG-10275 Integrate personal key features specs into end_to_end_idv feature specs #9336

Merged
merged 1 commit into from
Oct 10, 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
22 changes: 22 additions & 0 deletions spec/features/idv/end_to_end_idv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,32 @@ def validate_review_submit(user)
def validate_come_back_later_page
expect(page).to have_current_path(idv_letter_enqueued_path)
expect_in_person_gpo_step_indicator_current_step(t('step_indicator.flows.idv.get_a_letter'))
expect(page).to have_content(t('idv.titles.come_back_later'))
expect(page).not_to have_content(t('step_indicator.flows.idv.verify_phone_or_address'))
end

def validate_personal_key_page
expect(current_path).to eq idv_personal_key_path

# Clicking acknowledge checkbox is required to continue
click_continue
expect(page).to have_content(t('forms.validation.required_checkbox'))
expect(current_path).to eq(idv_personal_key_path)

expect(page).to have_content(t('forms.personal_key_partial.acknowledgement.header'))
expect(page).to have_content(t('forms.personal_key_partial.acknowledgement.text'))
expect(page).to have_content(t('forms.personal_key_partial.acknowledgement.help_link_text'))
expect(page).to have_content(t('idv.messages.confirm'))
expect_step_indicator_current_step(t('step_indicator.flows.idv.secure_account'))
expect(page).to have_css(
'.step-indicator__step--complete',
text: t('step_indicator.flows.idv.verify_phone_or_address'),
)
expect(page).not_to have_content(t('step_indicator.flows.idv.get_a_letter'))

# Refreshing shows same page (BUT with new personal key, we should warn the user)
Copy link
Member

Choose a reason for hiding this comment

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

Is this suggesting that the personal key is being regenerated each time? That would be surprising to me.

Is it not pulling from the idv_session here then?

def personal_key
idv_session.personal_key || generate_personal_key
end

Copy link
Contributor Author

@soniaconnolly soniaconnolly Oct 10, 2023

Choose a reason for hiding this comment

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

Huh, I didn't realize idv_session had a personal_key property. It's never set (except in specs). That would be an easy fix, if it's legit for security reasons to save a personal key in session. I made the comment because I've seen the behavior - it does regenerate a new key each time currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have LG-11221 to fix this, and I just added a comment with what you pointed out, thanks.

visit current_path
expect(page).not_to have_content(t('idv.messages.confirm'))
expect(page).to have_content(t('forms.personal_key_partial.acknowledgement.header'))
end

Expand Down
71 changes: 0 additions & 71 deletions spec/features/idv/steps/confirmation_step_spec.rb

This file was deleted.