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

feat(medusa, inventory): Search inventory items by title and description #4154

Merged

Conversation

pKorsholm
Copy link
Contributor

What

  • when searching for inventory items using a query search sku, title and description of each item

Why

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2023

🦋 Changeset detected

Latest commit: bed480f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@medusajs/inventory Patch
@medusajs/medusa Patch
@medusajs/admin-ui Patch
@medusajs/admin Patch
@medusajs/medusa-js Patch
medusa-payment-paypal Patch
medusa-payment-stripe Patch
medusa-plugin-restock-notification Patch
medusa-react Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented May 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
medusa-docs ⬜️ Ignored (Inspect) Visit Preview May 24, 2023 10:28am

@pKorsholm pKorsholm marked this pull request as ready for review May 23, 2023 03:35
@pKorsholm pKorsholm requested a review from a team as a code owner May 23, 2023 03:35
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM!

@olivermrbl olivermrbl changed the title Feat(medusa, inventory): Search inventory items by title and description feat(medusa, inventory): Search inventory items by title and description May 23, 2023

expect(response.data.inventory_items).toHaveLength(3)
expect(response.data.inventory_items).toEqual(
expect.arrayContaining([
Copy link
Contributor

@olivermrbl olivermrbl May 23, 2023

Choose a reason for hiding this comment

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

todo: Please add tests ensuring that unexpected items are not part of the response

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 tested to ensure that the default is not part of the result.

the expect on 564 should ensure that only the three objects are part of the result, the arrayContaining is just to ensure ordering doesn't matter

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM!

@pKorsholm pKorsholm force-pushed the feat/search-inventory-items-by-title-and-description branch from 356cbe8 to bed480f Compare May 24, 2023 10:28
@pKorsholm pKorsholm merged commit 0a35f21 into develop May 24, 2023
This was referenced May 24, 2023
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.

2 participants