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

Variants GetVariantsMatch Service #442

Merged

Conversation

bricht
Copy link
Contributor

@bricht bricht commented Nov 23, 2020

-Added GetVariantsMatch functionality
-Added api test

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes GetVariantsMatch service #359

Questions or comments

Code Review Checklist (*)

See detailed checklist

  • Story AC is completed
  • proposed changes correspond to Magento Technical Vision
  • new or changed code is covered with web-api/integration tests (if applicable)
    • expected results in test verified with data from fixture
  • no backward incompatible changes
  • Export API (et_schema.xml) and SF API schemas (proto schema) are reflected in the codebase
    • prerequisite: story branch created with all needed generated classes according to proposes schema-changes
    • DTO classes do not contain any manual changes (Magento\CatalogExportApi*, Magento\CatalogStorefrontApi*)
  • Class usage: magento/catalog-storefront repo don't use directly classes from magento/saas-export repo and vise-verse
    • Check composer.json dependencies
  • Legacy code is deleted
    • Any Data Providers present in Connector part (Magento\CatalogStorefrontConnector, Magento*Extractor modules)
    • And Data Providers from Export API (magento/saas-export repo) that is not relevant anymore
    • Any DTO for Export API/SF API which does not reflect current schema: et_schema, proto schema
    • Any “mapper” on Message Broker (between Export API and SF API)
      • if mapper still needed, verify fields used in mapping, remove not relevant fields

-Added GetVariantsMatch functionality
-Added api test
@bricht
Copy link
Contributor Author

bricht commented Nov 23, 2020

@magento run all tests

@bricht
Copy link
Contributor Author

bricht commented Nov 23, 2020

@magento run all tests

$simples[] = $this->productRepository->get($sku);
}
$availableVariants = $this->getExpectedProductVariants($configurable, $simples);
self::assertCount(9, $availableVariants, 'Wrong number of expected variants');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't test here our API, this part already been tested by Magento. If this error occurs "Wrong number of expected variants" we would guess we have an issue with API, but the problem will be with Magento repositories.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this part. We will get null pointer anyway if its empty, but I guess that's an error and not test failure.

-Removed validation of irrelevant part of test
@bricht
Copy link
Contributor Author

bricht commented Nov 26, 2020

@magento run all tests

@bricht
Copy link
Contributor Author

bricht commented Nov 30, 2020

@magento run Static Tests

jekabs added 3 commits December 1, 2020 11:49
-Return empty response instead of error, if product variants do not match selection
@bricht
Copy link
Contributor Author

bricht commented Dec 1, 2020

@magento run Static Tests

-Added getVariantsExactlyMatch service
-Added getVariantsInclude service
-Added test cases for these services
@bricht
Copy link
Contributor Author

bricht commented Dec 1, 2020

@magento run all tests

@bricht
Copy link
Contributor Author

bricht commented Dec 1, 2020

@magento run all tests

-Test fix
@bricht
Copy link
Contributor Author

bricht commented Dec 2, 2020

@magento run all tests

@RuslanKostiv1
Copy link
Contributor

@magento import pr to magento-commerce/catalog-storefront-ce

@magento-engcom-team
Copy link

@RuslanKostiv1 the pull request successfully imported.

@mmansoor-magento mmansoor-magento merged commit 91c93e3 into magento:develop Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GetVariantsMatch service
4 participants