Release 1.2.2: recover missed PrestaShop status changes

This commit is contained in:
fatequod
2026-10-08 10:57:21 +02:00
parent 86cf1a232f
commit d140625ba0
11 changed files with 401 additions and 19 deletions
+6 -2
View File
@@ -36,7 +36,10 @@ function dependencies(overrides = {}) {
const deps = {
Core,
Log: { info() {}, warn() {}, error() {} },
PsOrder: { findOne: async () => ({ psOrderId: 21, orbitoOrderId: ORDER_ID }) },
PsOrder: {
findOne: async () => ({ psOrderId: 21, orbitoOrderId: ORDER_ID }),
update: async () => ({ matchedCount: 1 }),
},
loadConfig: async () => ({
apiUrl: 'https://shop.test',
apiKey: 'secret',
@@ -44,7 +47,8 @@ function dependencies(overrides = {}) {
}),
apiFor: () => ({
setOrderState: async (...args) => {
calls.setOrderState.push(args);
calls.setOrderState.push(args.slice(0, 2));
await args[2]?.beforeWrite();
return { unchanged: false };
},
}),