|
7 | 7 | after { Flipper.disable(:pds_lookup_during_import) }
|
8 | 8 |
|
9 | 9 | scenario "User reviews and selects between duplicate records" do
|
10 |
| - stub_pds_get_nhs_number_to_return_a_patient |
11 |
| - stub_pds_search_to_return_a_patient |
| 10 | + and_pds_lookup_during_import_returns_nhs_numbers |
12 | 11 |
|
13 | 12 | given_i_am_signed_in
|
14 | 13 | and_an_hpv_programme_is_underway
|
@@ -36,6 +35,31 @@ def given_i_am_signed_in
|
36 | 35 | sign_in @team.users.first
|
37 | 36 | end
|
38 | 37 |
|
| 38 | + def and_pds_lookup_during_import_returns_nhs_numbers |
| 39 | + stub_pds_search_to_return_no_patients( |
| 40 | + "family" => "Smith", |
| 41 | + "given" => "Jimmy", |
| 42 | + "birthdate" => "eq2010-01-02", |
| 43 | + "address-postalcode" => "SW1A 1AA" |
| 44 | + ) |
| 45 | + |
| 46 | + stub_pds_search_to_return_a_patient( |
| 47 | + "9999075320", |
| 48 | + "family" => "Clarke", |
| 49 | + "given" => "Jennifer", |
| 50 | + "birthdate" => "eq2010-01-01", |
| 51 | + "address-postalcode" => "SW1A 1AA" |
| 52 | + ) |
| 53 | + |
| 54 | + stub_pds_search_to_return_a_patient( |
| 55 | + "9449306168", |
| 56 | + "family" => "Doe", |
| 57 | + "given" => "Mark", |
| 58 | + "birthdate" => "eq2010-01-03", |
| 59 | + "address-postalcode" => "SW1A 1AA" |
| 60 | + ) |
| 61 | + end |
| 62 | + |
39 | 63 | def and_an_hpv_programme_is_underway
|
40 | 64 | @school = create(:school, urn: "123456", team: @team)
|
41 | 65 | @session =
|
@@ -78,7 +102,9 @@ def and_i_upload_a_file_with_a_twin
|
78 | 102 | end
|
79 | 103 |
|
80 | 104 | def then_i_should_see_the_import_page_with_successful_import
|
81 |
| - expect(page).to have_content("0 previously imported records were omitted") |
| 105 | + expect(page).to have_content( |
| 106 | + "0 records were not imported because they already exist in Mavis" |
| 107 | + ) |
82 | 108 | expect(Patient.count).to eq(4)
|
83 | 109 | end
|
84 | 110 |
|
|
0 commit comments