fix(jd-publish): 删「未携带源商品身份」分档提示——该形状客户端已放行,分档文案断言的是已推翻口径
This commit is contained in:
@@ -386,14 +386,9 @@ function validationFailureNotice(item: JdPublishHistoryItemVo) {
|
|||||||
: '请保留已发布结果,核对京麦中的发布状态,然后重新选择未发布商品建单。'),
|
: '请保留已发布结果,核对京麦中的发布状态,然后重新选择未发布商品建单。'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 2026-11-21 四商品实测:京麦对「上架中」源商品的克隆页响应字段齐全但 productId/spuId
|
// 2026-11-21 复测:京麦对克隆参数响应不再回显源商品身份(人工入口同形状),客户端已
|
||||||
// 恒为 0——不是店铺归属问题,别把用户引去切店铺(切了也一样);只有其余形状才是换店信号。
|
// 放行该形状;能走到这里的 SOURCE 失败只剩「源商品已删除/不属于当前店铺/缺编码」——
|
||||||
if (detail.includes('未携带源商品身份')) {
|
// 引导换店或重选本店商品仍然成立。
|
||||||
return {
|
|
||||||
title: '本店源商品校验失败',
|
|
||||||
body: addAction('京麦未把该商品当作本店可克隆源(实测「上架中」商品如此),请改用「已下架」等非在售商品建单。'),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
title: '本店源商品校验失败',
|
title: '本店源商品校验失败',
|
||||||
body: addAction('请切换到正确店铺后重试,或重新选择本店商品建单。'),
|
body: addAction('请切换到正确店铺后重试,或重新选择本店商品建单。'),
|
||||||
|
|||||||
@@ -332,15 +332,10 @@ it('服务端不带直推载荷时重试维持兜底口径,不推空载荷', a
|
|||||||
expect(api.enqueue).not.toHaveBeenCalled()
|
expect(api.enqueue).not.toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('克隆身份缺失(上架中源商品)提示引导改用非在售商品,不再误导换店', async () => {
|
it('源商品身份缺失形状已被客户端放行,提示维持换店或重选口径', async () => {
|
||||||
const cloneIdentityError = '本店源商品校验失败:京麦克隆响应未携带源商品身份(productId=0)'
|
// 2026-11-21 复测:京麦不再回显克隆源身份(人工入口同形状),客户端对该形状放行;
|
||||||
api.history.mockResolvedValue({ items: [row('FAILED', 0, cloneIdentityError)] })
|
// 前端不再有「改用非在售商品」的分档——分档文案断言的是已推翻的口径,回归即红。
|
||||||
const page = await mountPage()
|
const page = await mountPage()
|
||||||
await page.get('.history-btn').trigger('click')
|
await page.get('.history-btn').trigger('click')
|
||||||
expect(page.text()).toContain('非在售商品')
|
expect(page.text()).not.toContain('非在售商品')
|
||||||
expect(page.text()).not.toContain('正确店铺')
|
|
||||||
expect(page.text()).not.toContain('JD_SOURCE_NOT_FOUND')
|
|
||||||
expect(api.alert).toHaveBeenCalledOnce()
|
|
||||||
expect(api.alert.mock.calls[0].join(' ')).toContain('「上架中」商品如此')
|
|
||||||
expect(page.get('.btn-retry').text()).toBe('重试')
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user