fix(jd-publish): 删「未携带源商品身份」分档提示——该形状客户端已放行,分档文案断言的是已推翻口径

This commit is contained in:
2026-11-21 14:40:33 +08:00
parent 4261103e31
commit 0f81034eab
2 changed files with 7 additions and 17 deletions
@@ -332,15 +332,10 @@ it('服务端不带直推载荷时重试维持兜底口径,不推空载荷', a
expect(api.enqueue).not.toHaveBeenCalled()
})
it('克隆身份缺失(上架中源商品)提示引导改用非在售商品,不再误导换店', async () => {
const cloneIdentityError = '本店源商品校验失败:京麦克隆响应未携带源商品身份(productId=0)'
api.history.mockResolvedValue({ items: [row('FAILED', 0, cloneIdentityError)] })
it('源商品身份缺失形状已被客户端放行,提示维持换店或重选口径', async () => {
// 2026-11-21 复测:京麦不再回显克隆源身份(人工入口同形状),客户端对该形状放行;
// 前端不再有「改用非在售商品」的分档——分档文案断言的是已推翻的口径,回归即红。
const page = await mountPage()
await page.get('.history-btn').trigger('click')
expect(page.text()).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('重试')
expect(page.text()).not.toContain('非在售商品')
})