Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specs for the cache refresh on variant removal #3725

Conversation

Projects
None yet
3 participants
@sauloperez
Copy link
Contributor

commented Apr 10, 2019

What? Why?

It was reported in #3691 (comment) that was working but a bit slow.

I investigated and the issue is that from the Bulk Products page we send a different HTTP request compared to the variants section of product details page. While in the latter we send DELETE /admin/products/tomatoes/variants/17, in the former we send a DELETE /api/products/tomatoes/variants/17/soft_delete.

This is failing in master but thanks to the VariantDeleter it does work in v2. This specs prove it.

What should we test?

The same as #3639 from the Bulk Products page. We should have an OC with a product containing more than one variant. Then, deleting one of them from the Bulk Products page should refresh the cache and therefore neither the shopfront nor the OC should display it anymore.

Release notes

Added specs to cover the products cache refresh when removing a variant from the Bulk Products page

Changelog Category: Added

Add specs for the cache refresh on variant removal
This is failing in `master` but thanks to the VariantDeleter it does work
in v2. This specs prove it.

@sauloperez sauloperez self-assigned this Apr 10, 2019

@sauloperez sauloperez referenced this pull request Apr 10, 2019

Closed

Release v1.30 #3691

@luisramos0
Copy link
Contributor

left a comment

👍

@Matt-Yorkley
Copy link
Contributor

left a comment

Nice!

@sauloperez sauloperez merged commit 380a9c5 into openfoodfoundation:2-0-stable Apr 19, 2019

1 check passed

semaphoreci The build passed on Semaphore.
Details

@sauloperez sauloperez deleted the coopdevs:add-specs-for-cache-variant-deletion branch Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.