Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinaislam committed Oct 30, 2024
1 parent 57d76ac commit e05fa1a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,18 @@
expect(response_html).to have_text "ID Type"
end
end

describe "for ID intake" do
let(:intake) { create :state_file_id_intake }
before do
sign_in intake
end

render_views
it 'has correct help text' do
get :edit
expect(response).to be_successful
expect(response_html).to have_text "Many state revenue agencies, including Idaho"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,18 @@
expect(response_html).to have_text "ID Type"
end
end

describe "for ID intake" do
let(:intake) { create :state_file_id_intake }
before do
sign_in intake
end

render_views
it 'has correct help text' do
get :edit
expect(response).to be_successful
expect(response_html).to have_text "Many state revenue agencies, including Idaho"
end
end
end
8 changes: 8 additions & 0 deletions spec/features/state_file/complete_intake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,14 @@
# 1099G Review
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t('state_file.questions.primary_state_id.edit.title')
choose I18n.t('state_file.questions.primary_state_id.state_id.id_type_question.dmv')
fill_in I18n.t('state_file.questions.primary_state_id.state_id.id_details.number'), with: "012345678"
select_cfa_date "state_file_primary_state_id_form_issue_date", 4.years.ago.beginning_of_year
select_cfa_date "state_file_primary_state_id_form_expiration_date", 4.years.from_now.beginning_of_year
select("Idaho", from: I18n.t('state_file.questions.primary_state_id.state_id.id_details.issue_state'))
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t('state_file.questions.id_sales_use_tax.edit.title', year: MultiTenantService.statefile.current_tax_year)
choose I18n.t("general.affirmative")
fill_in 'state_file_id_sales_use_tax_form_total_purchase_amount', with: "290"
Expand Down

0 comments on commit e05fa1a

Please sign in to comment.