chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
import { sliceEditor } from '@/component/onboarding-message/onboarding-editor/method/slice-editor';
|
||||
|
||||
// vi.mock需要在顶部,因为它会被提升
|
||||
// Vi.mock needs to be at the top because it will be promoted
|
||||
vi.mock('@coze-common/md-editor-adapter', () => ({
|
||||
ZoneDelta: vi.fn().mockImplementation(() => ({
|
||||
retain: vi.fn().mockReturnThis(),
|
||||
@@ -24,7 +24,7 @@ vi.mock('@coze-common/md-editor-adapter', () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
// 导入模拟后的ZoneDelta
|
||||
// Import the simulated ZoneDelta
|
||||
import { ZoneDelta } from '@coze-common/md-editor-adapter';
|
||||
|
||||
describe('sliceEditor', () => {
|
||||
@@ -36,13 +36,13 @@ describe('sliceEditor', () => {
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
|
||||
// 创建一个新的模拟实例
|
||||
// Create a new simulation instance
|
||||
mockZoneDeltaInstance = {
|
||||
retain: vi.fn().mockReturnThis(),
|
||||
delete: vi.fn().mockReturnThis(),
|
||||
};
|
||||
|
||||
// 重置ZoneDelta构造函数的实现
|
||||
// Implementation of Reset ZoneDelta Constructor
|
||||
vi.mocked(ZoneDelta).mockImplementation(() => mockZoneDeltaInstance);
|
||||
|
||||
mockedEditor = {
|
||||
@@ -110,7 +110,7 @@ describe('sliceEditor', () => {
|
||||
|
||||
expect(ZoneDelta).toHaveBeenCalledWith({ zoneId: 'zone1' });
|
||||
expect(mockZoneDeltaInstance.retain).toHaveBeenCalledWith(maxCount);
|
||||
expect(mockZoneDeltaInstance.delete).toHaveBeenCalledWith(1); // 实际计算出的值是1
|
||||
expect(mockZoneDeltaInstance.delete).toHaveBeenCalledWith(1); // The actual calculated value is 1.
|
||||
expect(mockApply).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,8 +43,8 @@ vi.mock('@coze-arch/bot-tea', () => ({
|
||||
},
|
||||
ParamsTypeDefine: {},
|
||||
PluginMockDataGenerateMode: {
|
||||
MANUAL: 0, // 手动创建
|
||||
RANDOM: 1, // 随机生成
|
||||
MANUAL: 0, // create manually
|
||||
RANDOM: 1, // random generation
|
||||
LLM: 2,
|
||||
},
|
||||
}));
|
||||
@@ -52,21 +52,21 @@ vi.mock('@coze-arch/bot-tea', () => ({
|
||||
vi.mock('@coze-arch/bot-hooks', () => ({
|
||||
SceneType: {
|
||||
BOT__VIEW__WORKFLOW: 'botViewWorkflow',
|
||||
/** bot 详情页查看 workflow,或新建 workflow 但未发布,点击返回 */
|
||||
/** View the workflow on the bot details page, or create a new workflow but not published, click Return */
|
||||
WORKFLOW__BACK__BOT: 'workflowBackBot',
|
||||
/** bot 详情页创建 workflow,在 workflow 发布后返回 */
|
||||
/** The bot details page creates a workflow and returns it after the workflow is published */
|
||||
WORKFLOW_PUBLISHED__BACK__BOT: 'workflowPublishedBackBot',
|
||||
/** bot 详情页进入 mock data 页面 */
|
||||
/** Bot details page Enter the mock data page */
|
||||
BOT__TO__PLUGIN_MOCK_DATA: 'botToPluginMockData',
|
||||
/** workflow 详情页进入 mock data 页面 */
|
||||
/** Workflow details page Enter the mock data page */
|
||||
WORKFLOW__TO__PLUGIN_MOCK_DATA: 'workflowToPluginMockData',
|
||||
/** mock set 页进入 mock data 页面 */
|
||||
/** Mock set page Enter the mock data page */
|
||||
PLUGIN_MOCK_SET__TO__PLUGIN_MOCK_DATA: 'pluginMockSetToPluginMockData',
|
||||
/** bot 详情页进入 knowledge 页面 */
|
||||
/** Bot details page Enter the knowledge page */
|
||||
BOT__VIEW__KNOWLEDGE: 'botViewKnowledge',
|
||||
/** knowledge 页面点击退出返回 bot 详情页(未点击添加) */
|
||||
/** Knowledge page Click Exit to return to bot details page (not clicked Add) */
|
||||
KNOWLEDGE__BACK__BOT: 'knowledgeBackBot',
|
||||
/** knowledge 页面点击返回 bot 详情页,并添加到 bot */
|
||||
/** Knowledge page Click to return to bot details page and add to bot */
|
||||
KNOWLEDGE__ADD_TO__BOT: 'knowledgeAddToBot',
|
||||
},
|
||||
usePageJumpService: vi.fn().mockReturnValue({
|
||||
|
||||
Reference in New Issue
Block a user