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

Cover Category CommandHandlers and QueryHandlers by behat tests #16966

Merged

Conversation

@tdavidsonas88
Copy link
Contributor

tdavidsonas88 commented Dec 31, 2019

Questions Answers
Branch? develop
Description? increases behat tests coverage for Category Management feature related handlers
Type? improvement
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? #14480
How to test? CI build should pass

GetCategoryForEditing
EditCategory
DeleteCategory
AddCategory refactored to use domain
BulkDeleteCategories
UpdateCategoryPosition
EditRootCategory


This change is Reviewable

@tdavidsonas88 tdavidsonas88 requested a review from PrestaShop/prestashop-core-developers as a code owner Dec 31, 2019
@tdavidsonas88 tdavidsonas88 changed the title Cover CommandHandlers and QueryHandlers by behat tests WIP: Cover CommandHandlers and QueryHandlers by behat tests Dec 31, 2019
@tdavidsonas88 tdavidsonas88 changed the title WIP: Cover CommandHandlers and QueryHandlers by behat tests WIP: Behat tests for Category handlers. Cover CommandHandlers and QueryHandlers by behat tests Jan 2, 2020
$imageType = new ImageType();
foreach ($imageTypes as $k => $imageType) {
if ($formattedSmall == $imageType['name']) {
$thumb = _PS_CAT_IMG_DIR_ . $categoryId->getValue() . '-' . $imageType['name'] . '.jpg';

This comment has been minimized.

Copy link
@matks

matks Jan 2, 2020

Contributor

I see you stumbled upon this code we are not proud of 😄.
Unfortunately we kept the previous behavior which is a bit raw, but we might be able to improve it in the future.

This comment has been minimized.

Copy link
@tdavidsonas88

tdavidsonas88 Jan 3, 2020

Author Contributor

Thanks for pointing this out, resolved this stumbling in a different way in Behat tests in the next pull request.


use PrestaShop\PrestaShop\Adapter\Form\ChoiceProvider\CategoryTreeChoiceProvider;

class CategoryTreeIterator

This comment has been minimized.

Copy link
@matks

matks Jan 2, 2020

Contributor

Nice way to handle this obstacle 👍

@tdavidsonas88 tdavidsonas88 changed the title WIP: Behat tests for Category handlers. Cover CommandHandlers and QueryHandlers by behat tests Behat tests for Category handlers. Cover CommandHandlers and QueryHandlers by behat tests Jan 2, 2020
@matks matks changed the title Behat tests for Category handlers. Cover CommandHandlers and QueryHandlers by behat tests Cover Category CommandHandlers and QueryHandlers by behat tests Jan 2, 2020
@matks matks added the migration label Jan 2, 2020
@matks matks added this to the 1.7.7.0 milestone Jan 2, 2020
@matks
matks approved these changes Jan 2, 2020
@matks matks merged commit 0907e0e into PrestaShop:develop Jan 2, 2020
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@matks

This comment has been minimized.

Copy link
Contributor

matks commented Jan 2, 2020

Thank you @tdavidsonas88

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