mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
refactor(editor): Rename design-system unit test files and snapshots (no-changelog) (#11539)
This commit is contained in:
parent
63d454b776
commit
5ca781bf3a
|
@ -15,3 +15,4 @@
|
|||
# refactor: Move test files alongside tested files (#11504)
|
||||
|
||||
7e58fc4fec468aca0b45d5bfe6150e1af632acbc
|
||||
f32b13c6ed078be042a735bc8621f27e00dc3116
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import AssistantAvatar from '../AssistantAvatar.vue';
|
||||
import AssistantAvatar from './AssistantAvatar.vue';
|
||||
|
||||
describe('AskAssistantAvatar', () => {
|
||||
it('renders small avatar correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import AskAssistantButton from '../AskAssistantButton.vue';
|
||||
import AskAssistantButton from './AskAssistantButton.vue';
|
||||
|
||||
describe('AskAssistantButton', () => {
|
||||
it('renders default button correctly', () => {
|
|
@ -2,7 +2,7 @@ import { render } from '@testing-library/vue';
|
|||
|
||||
import { n8nHtml } from 'n8n-design-system/directives';
|
||||
|
||||
import AskAssistantChat from '../AskAssistantChat.vue';
|
||||
import AskAssistantChat from './AskAssistantChat.vue';
|
||||
|
||||
const stubs = ['n8n-avatar', 'n8n-button', 'n8n-icon', 'n8n-icon-button'];
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import AssistantIcon from '../AssistantIcon.vue';
|
||||
import AssistantIcon from './AssistantIcon.vue';
|
||||
|
||||
describe('AssistantIcon', () => {
|
||||
it('renders default icon correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import AssistantLoadingMessage from '../AssistantLoadingMessage.vue';
|
||||
import AssistantLoadingMessage from './AssistantLoadingMessage.vue';
|
||||
|
||||
describe('AssistantLoadingMessage', () => {
|
||||
it('renders loading message correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import AssistantText from '../AssistantText.vue';
|
||||
import AssistantText from './AssistantText.vue';
|
||||
|
||||
describe('AssistantText', () => {
|
||||
it('renders default text correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import BetaTag from '../BetaTag.vue';
|
||||
import BetaTag from './BetaTag.vue';
|
||||
|
||||
describe('BetaTag', () => {
|
||||
it('renders beta tag correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import BlinkingCursor from '../BlinkingCursor.vue';
|
||||
import BlinkingCursor from './BlinkingCursor.vue';
|
||||
|
||||
describe('BlinkingCursor', () => {
|
||||
it('renders blinking cursor correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import CodeDiff from '../CodeDiff.vue';
|
||||
import CodeDiff from './CodeDiff.vue';
|
||||
|
||||
const stubs = ['n8n-button', 'n8n-icon'];
|
||||
|
|
@ -2,7 +2,7 @@ import { render } from '@testing-library/vue';
|
|||
import { beforeAll, describe } from 'vitest';
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
|
||||
import CondtionalRouterLink from '../CondtionalRouterLink.vue';
|
||||
import CondtionalRouterLink from './CondtionalRouterLink.vue';
|
||||
|
||||
const slots = {
|
||||
default: 'Button',
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8NActionBox from '../ActionBox.vue';
|
||||
import N8NActionBox from './ActionBox.vue';
|
||||
|
||||
describe('N8NActionBox', () => {
|
||||
it('should render correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nActionDropdown from '../ActionDropdown.vue';
|
||||
import N8nActionDropdown from './ActionDropdown.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nActionDropdown', () => {
|
|
@ -1,7 +1,7 @@
|
|||
import { render, screen } from '@testing-library/vue';
|
||||
|
||||
import N8nIcon from '../../N8nIcon';
|
||||
import N8nAlert from '../Alert.vue';
|
||||
import N8nAlert from './Alert.vue';
|
||||
import N8nIcon from '../N8nIcon';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nAlert', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nAvatar from '../Avatar.vue';
|
||||
import N8nAvatar from './Avatar.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nAlert', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nBadge from '../Badge.vue';
|
||||
import N8nBadge from './Badge.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nBadge', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render, screen } from '@testing-library/vue';
|
||||
|
||||
import N8nBlockUi from '../BlockUi.vue';
|
||||
import N8nBlockUi from './BlockUi.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nBlockUi', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nButton from '../Button.vue';
|
||||
import N8nButton from './Button.vue';
|
||||
|
||||
const slots = {
|
||||
default: 'Button',
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nCallout from '../Callout.vue';
|
||||
import N8nCallout from './Callout.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nCallout', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nCard from '../Card.vue';
|
||||
import N8nCard from './Card.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nCard', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nCheckbox from '../Checkbox.vue';
|
||||
import N8nCheckbox from './Checkbox.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nCheckbox', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8NCircleLoader from '../CircleLoader.vue';
|
||||
import N8NCircleLoader from './CircleLoader.vue';
|
||||
|
||||
describe('N8NCircleLoader', () => {
|
||||
it('should render correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nColorPicker from '../ColorPicker.vue';
|
||||
import N8nColorPicker from './ColorPicker.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nColorPicker', () => {
|
|
@ -2,8 +2,8 @@ import { render } from '@testing-library/vue';
|
|||
|
||||
import { removeDynamicAttributes } from 'n8n-design-system/utils';
|
||||
|
||||
import { rows, columns } from './data';
|
||||
import N8nDatatable from '../Datatable.vue';
|
||||
import { rows, columns } from './__tests__/data';
|
||||
import N8nDatatable from './Datatable.vue';
|
||||
|
||||
const stubs = [
|
||||
'n8n-option',
|
|
@ -1,5 +1,5 @@
|
|||
import { createComponentRenderer } from '../../../__tests__/render';
|
||||
import FormBox from '../FormBox.vue';
|
||||
import FormBox from './FormBox.vue';
|
||||
import { createComponentRenderer } from '../../__tests__/render';
|
||||
|
||||
const render = createComponentRenderer(FormBox);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nInfoTip from '../InfoTip.vue';
|
||||
import N8nInfoTip from './InfoTip.vue';
|
||||
|
||||
const slots = {
|
||||
default: ['Need help doing something?', '<a href="/docs" target="_blank">Open docs</a>'],
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nInput from '../Input.vue';
|
||||
import N8nInput from './Input.vue';
|
||||
|
||||
describe('N8nInput', () => {
|
||||
it('should render correctly', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import InputLabel from '../InputLabel.vue';
|
||||
import InputLabel from './InputLabel.vue';
|
||||
|
||||
describe('component', () => {
|
||||
describe('Text overflow behavior', () => {
|
|
@ -2,7 +2,7 @@ import { render, fireEvent } from '@testing-library/vue';
|
|||
|
||||
import { n8nHtml } from 'n8n-design-system/directives';
|
||||
|
||||
import N8nMarkdown from '../Markdown.vue';
|
||||
import N8nMarkdown from './Markdown.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nMarkdown', () => {
|
|
@ -3,7 +3,7 @@ import { configure, render, waitFor } from '@testing-library/vue';
|
|||
import { h } from 'vue';
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
|
||||
import NavigationDropdown from '../NavigationDropdown.vue';
|
||||
import NavigationDropdown from './NavigationDropdown.vue';
|
||||
|
||||
configure({ testIdAttribute: 'data-test-id' });
|
||||
|
|
@ -3,7 +3,7 @@ import { render } from '@testing-library/vue';
|
|||
import { N8nText } from 'n8n-design-system/components';
|
||||
import { n8nHtml } from 'n8n-design-system/directives';
|
||||
|
||||
import N8nNotice from '../Notice.vue';
|
||||
import N8nNotice from './Notice.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nNotice', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nRecycleScroller from '../RecycleScroller.vue';
|
||||
import N8nRecycleScroller from './RecycleScroller.vue';
|
||||
|
||||
const itemSize = 100;
|
||||
const itemKey = 'id';
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nRoute from '../Route.vue';
|
||||
import N8nRoute from './Route.vue';
|
||||
|
||||
describe('N8nRoute', () => {
|
||||
it('should render internal router links', () => {
|
|
@ -4,8 +4,8 @@ import { defineComponent, ref } from 'vue';
|
|||
|
||||
import { removeDynamicAttributes } from 'n8n-design-system/utils';
|
||||
|
||||
import N8nOption from '../../N8nOption/Option.vue';
|
||||
import N8nSelect from '../Select.vue';
|
||||
import N8nSelect from './Select.vue';
|
||||
import N8nOption from '../N8nOption/Option.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nSelect', () => {
|
|
@ -1,7 +1,7 @@
|
|||
import userEvent from '@testing-library/user-event';
|
||||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nTooltip from '../Tooltip.vue';
|
||||
import N8nTooltip from './Tooltip.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nTooltip', () => {
|
|
@ -1,6 +1,6 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
|
||||
import N8nTree from '../Tree.vue';
|
||||
import N8nTree from './Tree.vue';
|
||||
|
||||
describe('components', () => {
|
||||
describe('N8nTree', () => {
|
|
@ -2,7 +2,7 @@ import { render } from '@testing-library/vue';
|
|||
|
||||
import { N8nAvatar, N8nUserInfo } from 'n8n-design-system/main';
|
||||
|
||||
import UserStack from '../UserStack.vue';
|
||||
import UserStack from './UserStack.vue';
|
||||
|
||||
describe('UserStack', () => {
|
||||
it('should render flat user list', () => {
|
|
@ -1,7 +1,7 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
import { mock, mockClear } from 'vitest-mock-extended';
|
||||
|
||||
import ColorCircles from '../ColorCircles.vue';
|
||||
import ColorCircles from './ColorCircles.vue';
|
||||
|
||||
describe('ColorCircles', () => {
|
||||
const mockCssDeclaration = mock<CSSStyleDeclaration>();
|
|
@ -1,7 +1,7 @@
|
|||
import { render } from '@testing-library/vue';
|
||||
import { mock, mockClear } from 'vitest-mock-extended';
|
||||
|
||||
import Sizes from '../Sizes.vue';
|
||||
import Sizes from './Sizes.vue';
|
||||
|
||||
describe('Sizes', () => {
|
||||
const mockCssDeclaration = mock<CSSStyleDeclaration>();
|
|
@ -1,4 +1,4 @@
|
|||
import { createEventBus } from '../event-bus';
|
||||
import { createEventBus } from './event-bus';
|
||||
|
||||
describe('createEventBus()', () => {
|
||||
const eventBus = createEventBus();
|
|
@ -1,4 +1,4 @@
|
|||
import { toggleCheckbox } from '../markdown';
|
||||
import { toggleCheckbox } from './markdown';
|
||||
|
||||
describe('toggleCheckbox', () => {
|
||||
it('should do nothing when there are no checkboxes', () => {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue