refactor(editor): Move editor-ui and design-system to frontend dir (no-changelog) (#13564)

This commit is contained in:
Alex Grozav
2025-02-28 14:28:30 +02:00
committed by GitHub
parent 684353436d
commit f5743176e5
1635 changed files with 805 additions and 1079 deletions

View File

@@ -0,0 +1,42 @@
import { createComponentRenderer } from '@/__tests__/render';
import ProjectTabs from '@/components/Projects/ProjectTabs.vue';
vi.mock('vue-router', async () => {
const actual = await vi.importActual('vue-router');
const params = {};
return {
...actual,
useRoute: () => ({
params,
}),
};
});
const renderComponent = createComponentRenderer(ProjectTabs, {
global: {
stubs: {
'router-link': {
template: '<div><slot /></div>',
},
},
},
});
describe('ProjectTabs', () => {
it('should render home tabs', async () => {
const { getByText, queryByText } = renderComponent();
expect(getByText('Workflows')).toBeInTheDocument();
expect(getByText('Credentials')).toBeInTheDocument();
expect(getByText('Executions')).toBeInTheDocument();
expect(queryByText('Project settings')).not.toBeInTheDocument();
});
it('should render project tab Settings', () => {
const { getByText } = renderComponent({ props: { showSettings: true } });
expect(getByText('Workflows')).toBeInTheDocument();
expect(getByText('Credentials')).toBeInTheDocument();
expect(getByText('Executions')).toBeInTheDocument();
expect(getByText('Project settings')).toBeInTheDocument();
});
});