@reactionary/provider-medusa 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/test/search.provider.spec.js +16 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactionary/provider-medusa",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"zod": "4.1.9",
|
|
9
|
-
"@reactionary/core": "0.1.
|
|
9
|
+
"@reactionary/core": "0.1.7",
|
|
10
10
|
"@medusajs/js-sdk": "^2.0.0",
|
|
11
11
|
"debug": "^4.3.4",
|
|
12
12
|
"@medusajs/types": "^2.11.0",
|
|
@@ -68,6 +68,21 @@ describe("Medusa Search Provider", () => {
|
|
|
68
68
|
pageSize: 2
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
+
let candidate = categories.items[0];
|
|
72
|
+
while (candidate) {
|
|
73
|
+
const children = await categoryProvider.findChildCategories({
|
|
74
|
+
parentId: candidate.identifier,
|
|
75
|
+
paginationOptions: {
|
|
76
|
+
pageNumber: 1,
|
|
77
|
+
pageSize: 10
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
if (children.items.length > 0) {
|
|
81
|
+
candidate = children.items[0];
|
|
82
|
+
} else {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
71
86
|
const unfilteredSearch = await provider.queryByTerm({
|
|
72
87
|
search: {
|
|
73
88
|
term: "",
|
|
@@ -81,7 +96,7 @@ describe("Medusa Search Provider", () => {
|
|
|
81
96
|
});
|
|
82
97
|
expect(unfilteredSearch.totalCount).toBeGreaterThan(0);
|
|
83
98
|
const breadCrumb = await categoryProvider.getBreadcrumbPathToCategory({
|
|
84
|
-
id:
|
|
99
|
+
id: candidate.identifier
|
|
85
100
|
});
|
|
86
101
|
expect(breadCrumb.length).toBeGreaterThan(0);
|
|
87
102
|
const categoryFilter = await provider.createCategoryNavigationFilter({
|