Skip to content

"inactive items" dashboard spec examples: Uncomment & fix(?) or delete? #2773

@bobmazanec

Description

@bobmazanec

Summary

Do the "...doesn't count inactive items" dashboard spec examples represent desired functionality that should be restored?
Should they be deleted?

Things to Consider

There are 4 examples regarding inactive items in the Dashboard spec:

# it "doesn't count inactive items" do
# item = create(:donation, :with_items, item_quantity: 100, storage_location: storage_location).items.first
#
# visit subject
# within "#donations" do
# expect(page).to have_content("100")
# end
#
# item.update!(active: false)
# visit subject
# within "#donations" do
# expect(page).to have_no_content("100")
# end
# end

# it 'does not count inactive items' do
# item = create(:purchase, :with_items, item_quantity: 100, storage_location: storage_location).items.first
#
# visit subject
# within "#purchases" do
# expect(page).to have_content("100")
# end
#
# item.update!(active: false)
# visit subject
# within "#purchases" do
# expect(page).to have_no_content("100")
# end
# end

# it "doesn't count inactive items" do
# item = create(:manufacturer_donation, :with_items, item_quantity: 100, storage_location: storage_location).items.first
#
# visit subject
# within "#manufacturers" do
# expect(page).to have_content("100")
# end
#
# item.update!(active: false)
# visit subject
# within "#donations" do
# expect(page).to have_no_content("100")
# end
# end

# it "doesn't count inactive items" do
# item = create(:inventory_item, quantity: 100, storage_location: storage_location).item
# create(:distribution, :with_items, item: item, item_quantity: 100, storage_location: storage_location)
#
# visit subject
# within "#distributions" do
# expect(page).to have_content("100")
# end
#
# item.update!(active: false)
# visit subject
# within "#distributions" do
# expect(page).to have_no_content("100")
# end
# end

Can anyone involved add any more history/context beyond notes/conversation on the issue, commits, & PRs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions