feat(edit): 采集插件、编辑页SKU 属性动态展示、颜色展示开发
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
extractOzonGalleryImageUrls,
|
||||
extractOzonGalleryVideos,
|
||||
} from '../lib/ozon-parser.ts';
|
||||
import { formatCollectedDescription } from '../lib/description-format.ts';
|
||||
import { dedupeImageUrl, normaliseImageUrl } from '../lib/product-media.ts';
|
||||
|
||||
test('Ozon gallery fixture only returns product-gallery images', async () => {
|
||||
@@ -93,6 +94,15 @@ test('Ozon JSON-LD Product description is the fallback when rich content is abse
|
||||
);
|
||||
});
|
||||
|
||||
test('采集描述保留段落和列表,并为压平的 Ozon 结构标题补出换行', () => {
|
||||
assert.equal(
|
||||
formatCollectedDescription(
|
||||
'Описание товара:适合户外使用。Характеристики:- 容量:25 L- 材质:尼龙Преимущества:- 防水\n\nКомплектация:<br>背包',
|
||||
),
|
||||
'Описание товара:\n适合户外使用。\n\nХарактеристики:\n- 容量:25 L\n- 材质:尼龙\n\nПреимущества:\n- 防水\n\nКомплектация:\n背包',
|
||||
);
|
||||
});
|
||||
|
||||
test('Ozon full characteristics merge with the five short header characteristics', () => {
|
||||
const attributes = extractOzonCharacteristics([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user