Cart button to Add all to cart & Add/Remove scene from cart added to search bar if CART_ENABLED set to true in config.json
Button clicks add and/or remove items from cart per AC
Fix map legend to always show 'Scenes in Cart' symbology when CART_ENABLED set to true in config.json and Items exist in cart
BONUS 1: PopupResults component updated to allow users to minimize/maximize popup results component content
BONUS 2: Cart items are now shown in layer on map if CART_ENABLED set to true in config.json and Items exist in cart (not this was out of scope so placeholder solution implemented in this ticket but will be revisited in future team discussions for follow up with better UX)
NOTE: number of diffs is inflated by adding mocks, real number of diffs is closer to 900 additions (this subtracts the 1,960 coming from shared-mocks.js) š
To test:
all unit tests pass š
Test cart not enabled
set CART_ENABLED to false in config.json
load app
click search
zoom in until you can click on scenes
click on any grid or individual scenes
confirm clicked results show in popup results
confirm Add all scenes to cart button does not render
confirm Add scene to cart button does not render
Test cart enabled buttons in popup
set CART_ENABLED to true in config.json
load app
click search
zoom in until you can click on scenes
click search again if needed
click on any grid or individual scenes
confirm clicked results show in popup results
confirm Add all scenes to cart button renders in popup
confirm Add scene to cart button renders in popup
Test Add/remove scene to cart button
load app
search
click on scene so that more than one scene is clicked
click Add scene to cart button
confirm button text changes to say 'Remove scene from cart'
confirm cart button in top search bar reflects 1 scene in cart
confirm summary text in top of popup shows '(1 in cart)'
confirm legend shows 'Scenes in cart' symbology
confirm map outline shows orange for footprint added to cart
click 'Remove scene from cart' button
confirm button text changes to say Add scene to cart
confirm cart button in top search bar reflects 0 and is no longer green
confirm summary text in top of popup no longer shows '(1 in cart)'
confirm legend no longer shows 'Scenes in cart' symbology
confirm map outline no longer shows orange for footprint added to cart
Test Add all to cart button
load app
search
click on scene so that more than one scene is clicked
click Add all to cart button
confirm Add all to cart button is no longer clickable
confirm cart button in top search bar reflects total number of scenes added
confirm summary text in top of popup shows '({ total number of scenes} in cart)'
confirm legend shows 'Scenes in cart' symbology
confirm map outline shows orange for all footprints added to cart
confirm bottom button text changes to say 'Remove scene from cart'
click the next arrow in the lower left of the popup
confirm bottom button text still says 'Remove scene from cart'
while on second page, click 'Remove scene from cart' button
confirm 'Add all to cart' button gets enabled again
click 'Add all to cart' button again
confirm cart only gets increased by one (so only those not already in cart get added)
confirm 'Add all to cart' button gets disabled again
Test BONUS 1: minimize popup result
load app
search
click on scene(s)
click the down arrow button in the top right of the popup result
confirm single result details no longer renders
confirm 'Add scene to cart' button no longer renders
confirm 'Add all to cart' button still renders
click next arrow in lower right of popup
confirm map loads image overlay for next scene
confirm popup result reflects incremented index of selected scene
click up arrow in top right of popup result
confirm single result details loads
confirm single result detail reflects correct currently selected scene/image on map
Test BONUS 2: persisted cart map layer
load app
search (make note of starting collection and search date range)
click on scene(s)
click 'Add all to cart' button
confirm orange map footprints get added
click close 'X' button in top right of popup results
confirm orange map footprints still show on map after popup is closed
change collection
confirm orange map footprints still show on map
search in new collection
confirm orange map footprints still show on map
change collections and zoom levels to view grid aggregations and hex aggregations
confirm orange map footprints still show on map
change back to original collection
change back to original date range
click search
click original scenes selected again
for each, click 'Remove scene from cart'
confirm orange map footprints no longer show on map
PR Checklist:
[X] I have added my changes to the CHANGELOGor a CHANGELOG entry is not required.
Related Issue(s):
Proposed Changes:
Add all to cart
&Add/Remove scene from cart
added to search bar ifCART_ENABLED
set to true inconfig.json
CART_ENABLED
set to true inconfig.json
and Items exist in cartBONUS 1: PopupResults component updated to allow users to minimize/maximize popup results component content
BONUS 2: Cart items are now shown in layer on map if
CART_ENABLED
set to true inconfig.json
and Items exist in cart (not this was out of scope so placeholder solution implemented in this ticket but will be revisited in future team discussions for follow up with better UX)To test:
Test cart not enabled
CART_ENABLED
tofalse
inconfig.json
Add all scenes to cart
button does not renderAdd scene to cart
button does not renderTest cart enabled buttons in popup
CART_ENABLED
totrue
inconfig.json
Add all scenes to cart
button renders in popupAdd scene to cart
button renders in popupTest
Add/remove scene to cart
buttonAdd scene to cart
buttonAdd scene to cart
Test
Add all to cart
buttonAdd all to cart
buttonAdd all to cart
button is no longer clickableTest BONUS 1: minimize popup result
Test BONUS 2: persisted cart map layer
PR Checklist: