Skip to content

Commit

Permalink
refactor(create-spec): update system tests to check for success text (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrigoriev8109 authored Nov 22, 2023
1 parent b6f2ec0 commit 2b88b68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/system/case_contacts/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@

click_on "New Case Contact"
complete_form(casa_case)

click_on "Submit"

expect(page).to have_current_path(case_contacts_path)
expect(page).to have_text "Case contact successfully created"
end

it "when /case_contacts?casa_case_id=ID" do
Expand All @@ -26,7 +27,7 @@
complete_form(casa_case)
click_on "Submit"

expect(page).to have_current_path(case_contacts_path(casa_case_id: casa_case.id))
expect(page).to have_text "Case contact successfully created"
end

it "when /casa_cases/CASE_NUMBER" do
Expand All @@ -36,7 +37,7 @@
complete_form(casa_case)
click_on "Submit"

expect(page).to have_current_path(casa_case_path(casa_case))
expect(page).to have_text "Case contact successfully created"
end
end
end
Expand Down

0 comments on commit 2b88b68

Please sign in to comment.