feat: add brand knowledge template types
This commit is contained in:
parent
e5da7f0e25
commit
b53a382715
@ -81,7 +81,7 @@ const previewFile = {
|
||||
function uploadRequest() {
|
||||
const values = new Map<string, unknown>([
|
||||
['title', '长图规范'],
|
||||
['knowledgeType', '影像规范'],
|
||||
['knowledgeType', '主图模板'],
|
||||
['brand', '索菲亚'],
|
||||
['productCategoryName', '衣柜'],
|
||||
['uploadId', 'upload-1'],
|
||||
@ -311,7 +311,7 @@ describe('brand knowledge upload route', () => {
|
||||
test('replays the existing knowledge record without consuming the merged file twice', async () => {
|
||||
const replayed = createdRecord({
|
||||
title: '长图规范',
|
||||
knowledgeType: '影像规范',
|
||||
knowledgeType: '主图模板',
|
||||
brand: '索菲亚',
|
||||
productCategoryName: '衣柜',
|
||||
fileName: 'knowledge.pdf',
|
||||
|
||||
@ -280,6 +280,10 @@ describe('BrandKnowledgeDashboard', () => {
|
||||
expect(screen.getByRole('button', { name: '提交知识' })).toBeDisabled()
|
||||
const knowledgeTypeSelect = screen.getByRole('dialog').querySelector('select') as HTMLSelectElement
|
||||
expect(Array.from(knowledgeTypeSelect.querySelectorAll('option')).map((option) => option.textContent)).toEqual([...BRAND_KNOWLEDGE_TYPE_OPTIONS])
|
||||
expect(Array.from(knowledgeTypeSelect.options).map((option) => option.value)).toEqual([
|
||||
'主图规范', '主图模板', '详情页规范', '详情页模板', 'sku规范',
|
||||
'sku模板', '主图视频规范', '主图视频模板', '影像规范', '品牌VI',
|
||||
])
|
||||
|
||||
fireEvent.change(screen.getByLabelText('知识标题'), { target: { value: '品牌手册' } })
|
||||
await waitFor(() => expect(screen.getByRole('option', { name: '床类' })).toBeInTheDocument())
|
||||
|
||||
@ -26,9 +26,13 @@ export const BRAND_KNOWLEDGE_PREVIEW_IMAGE_ACCEPT = BRAND_KNOWLEDGE_PREVIEW_IMAG
|
||||
|
||||
export const BRAND_KNOWLEDGE_TYPE_OPTIONS = [
|
||||
'主图规范',
|
||||
'主图模板',
|
||||
'详情页规范',
|
||||
'详情页模板',
|
||||
'sku规范',
|
||||
'sku模板',
|
||||
'主图视频规范',
|
||||
'主图视频模板',
|
||||
'影像规范',
|
||||
'品牌VI',
|
||||
] as const
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user