Skip to content

Commit 5207853

Browse files
committed
Rubocop
1 parent f3aa5ff commit 5207853

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

spec/system/kit_system_spec.rb

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,45 +229,42 @@
229229

230230
describe "when duplicate items" do
231231
it "detects duplicate items and shows modal", js: true do
232-
# Disable server-side validation to test JS modal
233-
#allow_any_instance_of(Audit).to receive(:line_items_unique_by_item_id)
234232
visit new_kit_path
235233
click_link "New Kit"
236234

237235
kit_traits = attributes_for(:kit)
238236
fill_in "Name", with: kit_traits[:name]
239237
find(:css, '#kit_value_in_dollars').set('10.10')
240-
238+
241239
item = Item.last
242240

243241
# Add first entry for the item
244242
select item.name, from: "item_line_items_attributes_0_item_id"
245243
fill_in "item_line_items_attributes_0_quantity", with: "10"
246-
244+
247245
# Add a new line item row
248246
find("[data-form-input-target='addButton']").click
249-
247+
250248
# Add second entry for the same item
251249
within all('.line_item_section').last do
252250
item_select = find('select[name*="[item_id]"]')
253251
select item.name, from: item_select[:id]
254252
quantity_input = find('input[name*="[quantity]"]')
255253
fill_in quantity_input[:id], with: "15"
256254
end
257-
255+
258256
# Try to save - should trigger duplicate detection modal
259257
click_button "Save"
260-
258+
261259
# JavaScript modal should appear
262260
expect(page).to have_css("#duplicateItemsModal", visible: true)
263261
expect(page).to have_content("Multiple Item Entries Detected")
264262
expect(page).to have_content("Merge Items")
265263
expect(page).to have_content("Make Changes")
266-
267-
264+
268265
# Test merge functionality
269266
click_button "Merge Items"
270-
267+
271268
expect(page.find(".alert")).to have_content "Kit created successfully"
272269
expect(page).to have_content(kit_traits[:name])
273270
expect(page).to have_content("25 #{item.name}")

0 commit comments

Comments
 (0)