mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-05 02:59:27 +02:00
fix(editor): Avoid duplicate empty-state prompt copy (no-changelog) (#31182)
This commit is contained in:
parent
11dfca24d9
commit
f484b6331b
|
|
@ -156,6 +156,16 @@ describe('WorkflowsView', () => {
|
|||
expect(getByText('There are currently no workflows to view')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('does not repeat generic prompt in fallback empty state', async () => {
|
||||
const projectsStore = mockedStore(useProjectsStore);
|
||||
projectsStore.currentProject = { scopes: ['workflow:create'] } as Project;
|
||||
|
||||
const { getAllByText } = renderComponent({ pinia });
|
||||
await waitAllPromises();
|
||||
|
||||
expect(getAllByText('What do you want to build?')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('for user with create scope', async () => {
|
||||
const projectsStore = mockedStore(useProjectsStore);
|
||||
projectsStore.currentProject = { scopes: ['workflow:create'] } as Project;
|
||||
|
|
|
|||
|
|
@ -96,9 +96,11 @@ export function useWorkflowsEmptyState() {
|
|||
return i18n.baseText('workflows.empty.description.readOnlyEnv');
|
||||
} else if (!projectPermissions.value.workflow.create) {
|
||||
return i18n.baseText('workflows.empty.description.noPermission');
|
||||
} else {
|
||||
} else if (showRecommendedTemplatesInline.value) {
|
||||
return i18n.baseText('workflows.empty.description');
|
||||
}
|
||||
|
||||
return '';
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user