|
33 | 33 | select "Submitted", from: "casa_case_court_report_status" |
34 | 34 |
|
35 | 35 | find(".ts-control").click |
36 | | - find("span", text: contact_type.name).click |
37 | | - find(".ts-control").click |
| 36 | + |
| 37 | + ts_checkboxes = page.all('.ts-dropdown-content input') |
| 38 | + select_all_el = page.find('span[data-test=select-all-input]') |
| 39 | + # uncheck all contact type options |
| 40 | + select_all_el.click |
| 41 | + ts_checkboxes.each do |el| |
| 42 | + expect(el).not_to be_checked |
| 43 | + end |
| 44 | + # check all contact type options |
| 45 | + select_all_el.click |
| 46 | + expect(ts_checkboxes).to all(be_checked) |
38 | 47 |
|
39 | 48 | select "Test User", from: "casa_case[case_assignments_attributes][0][volunteer_id]" |
40 | 49 |
|
|
57 | 66 | casa_org = build(:casa_org) |
58 | 67 | admin = create(:casa_admin, casa_org: casa_org) |
59 | 68 | contact_type_group = create(:contact_type_group, casa_org: casa_org) |
60 | | - contact_type = create(:contact_type, contact_type_group: contact_type_group) |
| 69 | + create(:contact_type, contact_type_group: contact_type_group) |
61 | 70 | case_number = "12345" |
62 | 71 |
|
63 | 72 | sign_in admin |
|
69 | 78 | select "March", from: "casa_case_birth_month_year_youth_2i" |
70 | 79 | select five_years, from: "casa_case_birth_month_year_youth_1i" |
71 | 80 |
|
72 | | - find(".ts-control").click |
73 | | - find("span", text: contact_type.name).click |
74 | | - |
75 | 81 | within ".actions-cc" do |
76 | 82 | click_on "Create CASA Case" |
77 | 83 | end |
|
109 | 115 | casa_org = build(:casa_org) |
110 | 116 | admin = create(:casa_admin, casa_org: casa_org) |
111 | 117 | contact_type_group = create(:contact_type_group, casa_org: casa_org) |
112 | | - contact_type = create(:contact_type, contact_type_group: contact_type_group) |
| 118 | + create(:contact_type, contact_type_group: contact_type_group) |
113 | 119 | case_number = "12345" |
114 | 120 |
|
115 | 121 | sign_in admin |
|
121 | 127 | select five_years, from: "casa_case_birth_month_year_youth_1i" |
122 | 128 | check "casa_case_empty_court_date" |
123 | 129 |
|
124 | | - find(".ts-control").click |
125 | | - find("span", text: contact_type.name).click |
126 | | - |
127 | 130 | within ".actions-cc" do |
128 | 131 | click_on "Create CASA Case" |
129 | 132 | end |
|
152 | 155 | select "March", from: "casa_case_birth_month_year_youth_2i" |
153 | 156 | select five_years, from: "casa_case_birth_month_year_youth_1i" |
154 | 157 |
|
155 | | - find(".ts-control").click |
156 | | - find("span", text: contact_type.name).click |
| 158 | + # 2/14/2025 - by default, all contact types are selected on page load so don't need to manually select |
157 | 159 |
|
158 | 160 | within ".actions-cc" do |
159 | 161 | click_on "Create CASA Case" |
|
0 commit comments