Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

CIF-421 - Magento searchProducts action does not support multiple parameters #37

Merged
merged 3 commits into from
Aug 22, 2018

Conversation

cjelger
Copy link
Contributor

@cjelger cjelger commented Aug 22, 2018

  • added support for multiple search parameter values for a given filter

Adds support for multiple values for search parameters.

Description

Adds support for multiple values for search parameters.

Related Issue

CIF-421

Motivation and Context

See CIF-421

How Has This Been Tested?

Added unit + integration test.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code passes the code style as defined by ESLint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

…ameters

- added support for multiple search parameter values for a given filter
@codecov-io
Copy link

codecov-io commented Aug 22, 2018

Codecov Report

Merging #37 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
+ Coverage   97.43%   97.44%   +0.01%     
==========================================
  Files          50       50              
  Lines        1013     1019       +6     
==========================================
+ Hits          987      993       +6     
  Misses         26       26
Impacted Files Coverage Δ
src/products/ProductGraphQlRequestBuilder.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40f8933...f429c49. Read the comment docs.

@@ -144,6 +144,25 @@ describe('magento searchProducts', function() {
});
});

it('returns a valid response with 2 SKUs', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an additional test with more complex filter? Like 2 sku + 1 category and 2 sku + text = shirt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added an extra test for sku + text, note that in this case the search performs an AND operation.

@hasnarobert hasnarobert changed the title CIF-421 - Magento searchProducts action does not support multiple par… CIF-421 - Magento searchProducts action does not support multiple parameters Aug 22, 2018
…ameters

- added an extra IT for a combined search
@cjelger cjelger merged commit 4505f93 into master Aug 22, 2018
@cjelger cjelger deleted the CIF-421 branch August 22, 2018 12:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants