-
-
Notifications
You must be signed in to change notification settings - Fork 572
"inactive items" dashboard spec examples: Uncomment & fix(?) or delete? #2773
Description
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:
human-essentials/spec/system/dashboard_system_spec.rb
Lines 135 to 148 in 693f9ff
| # 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 |
human-essentials/spec/system/dashboard_system_spec.rb
Lines 267 to 280 in 693f9ff
| # 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 |
human-essentials/spec/system/dashboard_system_spec.rb
Lines 520 to 533 in 693f9ff
| # 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 |
human-essentials/spec/system/dashboard_system_spec.rb
Lines 679 to 693 in 693f9ff
| # 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 |
- These examples were commented out and related controller code removed in Fix the dashboard display issue. #2638
- That PR appears to have addressed As a Bank Admin I am seeing items in triplicate in the Dashboard #2681
- The controller code and model scopes were added in Unmark dashboard system specs as pending #2556
- The examples were added in Incorrect diaper drive numbers #1030
Can anyone involved add any more history/context beyond notes/conversation on the issue, commits, & PRs?