Commit d0a890e9 by DigHuang Committed by GitHub

fix(workflow): preload workflow i18n on app creation (#7464)

parent e4be02e2
...@@ -616,7 +616,7 @@ export default CreateAppsPage; ...@@ -616,7 +616,7 @@ export default CreateAppsPage;
export async function getServerSideProps(content: any) { export async function getServerSideProps(content: any) {
return { return {
props: { props: {
...(await serviceSideProps(content, ['app', 'user'])) ...(await serviceSideProps(content, ['app', 'user', 'workflow']))
} }
}; };
} }
...@@ -12,6 +12,10 @@ describe('getEmptyAppsTemplate', () => { ...@@ -12,6 +12,10 @@ describe('getEmptyAppsTemplate', () => {
]; ];
expect(nodes.every((node) => node.name.startsWith('translated:'))).toBe(true); expect(nodes.every((node) => node.name.startsWith('translated:'))).toBe(true);
expect(templates[AppTypeEnum.workflowTool].nodes[0]).toMatchObject({
nodeId: 'pluginInput',
name: 'translated:workflow:template.plugin_start'
});
expect(nodes.filter((node) => node.intro).map((node) => node.intro)).toEqual([ expect(nodes.filter((node) => node.intro).map((node) => node.intro)).toEqual([
'translated:common:core.module.template.config_params', 'translated:common:core.module.template.config_params',
'translated:common:core.module.template.ai_chat_intro', 'translated:common:core.module.template.ai_chat_intro',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment