fix(prestashop): import combinations as distinct products in 1.1.10

This commit is contained in:
fatequod
2026-09-18 15:11:06 +02:00
parent 519f8daeb0
commit af0dceaa1b
10 changed files with 269 additions and 61 deletions
+12
View File
@@ -108,6 +108,18 @@ test('does not turn an unsafe reference filter into an empty combination match',
assert.equal(await api.findProductCombinationsByReference('1', 'SKU[1]'), null);
});
test('uses a combination image before the base product cover', async () => {
const api = new PrestashopApi('https://shop.example', 'secret', true, { maxGetAttempts: 1 });
api.getProduct = async () => assert.fail('base product must not be fetched when variant has an image');
const url = await api.getProductCoverImageUrl('1', {
associations: { images: [{ id: '55' }] },
});
assert.match(url, /images\/products\/1\/55\/home_default/);
assert.match(url, /ws_key=secret/);
});
test('collects public customer notes from order, cart and customer thread without cross-order leakage', async t => {
const originalFetch = Core.fetch;
t.after(() => { Core.fetch = originalFetch; });