refactor(i18n): 全工程面向国际用户与全球现代商务重构,彻底清理出海跨境等单向视角表达并对齐自动化测试
这个提交包含在:
@@ -8,7 +8,7 @@ import {
|
||||
adminCardCasesCurdOption,
|
||||
} from '../../../src/modules/card/controller/admin/cases';
|
||||
|
||||
describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
describe('后台案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
const entityFile = path.join(
|
||||
__dirname,
|
||||
'../../../src/modules/card/entity/cases.ts'
|
||||
@@ -59,10 +59,10 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
});
|
||||
|
||||
describe('2. 实体字段契约 (CardCasesEntity)', () => {
|
||||
it('实体实例应支持出海案例必需契约字段', () => {
|
||||
it('实体实例应支持案例必需契约字段', () => {
|
||||
const item = new CardCasesEntity();
|
||||
item.cardId = 1001;
|
||||
item.title = '智能电动滑板车欧美 DTC 出海';
|
||||
item.title = '智能电动滑板车欧美 DTC 全球拓展';
|
||||
item.client = 'VoltRide Global';
|
||||
item.duration = '2024.01 - 2024.06';
|
||||
item.metrics = '+320% ROI, 45,000+ 留资量';
|
||||
@@ -72,7 +72,7 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
item.sortOrder = 1;
|
||||
|
||||
expect(item.cardId).toBe(1001);
|
||||
expect(item.title).toBe('智能电动滑板车欧美 DTC 出海');
|
||||
expect(item.title).toBe('智能电动滑板车欧美 DTC 全球拓展');
|
||||
expect(item.client).toBe('VoltRide Global');
|
||||
expect(item.duration).toBe('2024.01 - 2024.06');
|
||||
expect(item.metrics).toBe('+320% ROI, 45,000+ 留资量');
|
||||
@@ -92,7 +92,7 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
Object.assign(new CardCasesEntity(), {
|
||||
id: 1,
|
||||
cardId: 101,
|
||||
title: '跨境智能硬件众筹出海',
|
||||
title: '全球智能硬件众筹发布',
|
||||
client: 'TechNova',
|
||||
duration: '3个月',
|
||||
metrics: '+280% 众筹目标达成',
|
||||
@@ -103,7 +103,7 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
Object.assign(new CardCasesEntity(), {
|
||||
id: 2,
|
||||
cardId: 101,
|
||||
title: '东南亚 TikTok 跨境直播获客',
|
||||
title: '东南亚 TikTok 国际直播获客',
|
||||
client: 'FashionGo',
|
||||
duration: '6个月',
|
||||
metrics: '千万级曝光, +150% GMV',
|
||||
@@ -163,9 +163,9 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
it('getCasesByCardId 应根据名片 cardId 筛选并按 sortOrder 升序排列', async () => {
|
||||
const cases = await service.getCasesByCardId(101);
|
||||
expect(cases).toHaveLength(2);
|
||||
expect(cases[0].title).toBe('东南亚 TikTok 跨境直播获客');
|
||||
expect(cases[0].title).toBe('东南亚 TikTok 国际直播获客');
|
||||
expect(cases[0].sortOrder).toBe(1);
|
||||
expect(cases[1].title).toBe('跨境智能硬件众筹出海');
|
||||
expect(cases[1].title).toBe('全球智能硬件众筹发布');
|
||||
expect(cases[1].sortOrder).toBe(2);
|
||||
});
|
||||
|
||||
@@ -177,7 +177,7 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
it('创建案例并能查询出最新案例', async () => {
|
||||
const created = await service.cardCasesEntity.save({
|
||||
cardId: 101,
|
||||
title: '拉美电商本土化品牌出海',
|
||||
title: '拉美电商本土化品牌打造',
|
||||
client: 'LatamDirect',
|
||||
duration: '4个月',
|
||||
metrics: '+90% 复购率',
|
||||
@@ -187,7 +187,7 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => {
|
||||
});
|
||||
|
||||
expect(created.id).toBeDefined();
|
||||
expect(created.title).toBe('拉美电商本土化品牌出海');
|
||||
expect(created.title).toBe('拉美电商本土化品牌打造');
|
||||
|
||||
const found = await service.cardCasesEntity.findOneBy({ id: created.id });
|
||||
expect(found).not.toBeNull();
|
||||
|
||||
在新工单中引用
屏蔽一个用户