refactor(editor): Rename design-system unit test files and snapshots (no-changelog) (#11539)

This commit is contained in:
Alex Grozav 2024-11-05 14:20:02 +02:00 committed by GitHub
parent 63d454b776
commit 5ca781bf3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
152 changed files with 45 additions and 44 deletions

View file

@ -15,3 +15,4 @@
# refactor: Move test files alongside tested files (#11504) # refactor: Move test files alongside tested files (#11504)
7e58fc4fec468aca0b45d5bfe6150e1af632acbc 7e58fc4fec468aca0b45d5bfe6150e1af632acbc
f32b13c6ed078be042a735bc8621f27e00dc3116

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import AssistantAvatar from '../AssistantAvatar.vue'; import AssistantAvatar from './AssistantAvatar.vue';
describe('AskAssistantAvatar', () => { describe('AskAssistantAvatar', () => {
it('renders small avatar correctly', () => { it('renders small avatar correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import AskAssistantButton from '../AskAssistantButton.vue'; import AskAssistantButton from './AskAssistantButton.vue';
describe('AskAssistantButton', () => { describe('AskAssistantButton', () => {
it('renders default button correctly', () => { it('renders default button correctly', () => {

View file

@ -2,7 +2,7 @@ import { render } from '@testing-library/vue';
import { n8nHtml } from 'n8n-design-system/directives'; 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']; const stubs = ['n8n-avatar', 'n8n-button', 'n8n-icon', 'n8n-icon-button'];

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import AssistantIcon from '../AssistantIcon.vue'; import AssistantIcon from './AssistantIcon.vue';
describe('AssistantIcon', () => { describe('AssistantIcon', () => {
it('renders default icon correctly', () => { it('renders default icon correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import AssistantLoadingMessage from '../AssistantLoadingMessage.vue'; import AssistantLoadingMessage from './AssistantLoadingMessage.vue';
describe('AssistantLoadingMessage', () => { describe('AssistantLoadingMessage', () => {
it('renders loading message correctly', () => { it('renders loading message correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import AssistantText from '../AssistantText.vue'; import AssistantText from './AssistantText.vue';
describe('AssistantText', () => { describe('AssistantText', () => {
it('renders default text correctly', () => { it('renders default text correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import BetaTag from '../BetaTag.vue'; import BetaTag from './BetaTag.vue';
describe('BetaTag', () => { describe('BetaTag', () => {
it('renders beta tag correctly', () => { it('renders beta tag correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import BlinkingCursor from '../BlinkingCursor.vue'; import BlinkingCursor from './BlinkingCursor.vue';
describe('BlinkingCursor', () => { describe('BlinkingCursor', () => {
it('renders blinking cursor correctly', () => { it('renders blinking cursor correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import CodeDiff from '../CodeDiff.vue'; import CodeDiff from './CodeDiff.vue';
const stubs = ['n8n-button', 'n8n-icon']; const stubs = ['n8n-button', 'n8n-icon'];

View file

@ -2,7 +2,7 @@ import { render } from '@testing-library/vue';
import { beforeAll, describe } from 'vitest'; import { beforeAll, describe } from 'vitest';
import { createRouter, createWebHistory } from 'vue-router'; import { createRouter, createWebHistory } from 'vue-router';
import CondtionalRouterLink from '../CondtionalRouterLink.vue'; import CondtionalRouterLink from './CondtionalRouterLink.vue';
const slots = { const slots = {
default: 'Button', default: 'Button',

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8NActionBox from '../ActionBox.vue'; import N8NActionBox from './ActionBox.vue';
describe('N8NActionBox', () => { describe('N8NActionBox', () => {
it('should render correctly', () => { it('should render correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nActionDropdown from '../ActionDropdown.vue'; import N8nActionDropdown from './ActionDropdown.vue';
describe('components', () => { describe('components', () => {
describe('N8nActionDropdown', () => { describe('N8nActionDropdown', () => {

View file

@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/vue'; 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('components', () => {
describe('N8nAlert', () => { describe('N8nAlert', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nAvatar from '../Avatar.vue'; import N8nAvatar from './Avatar.vue';
describe('components', () => { describe('components', () => {
describe('N8nAlert', () => { describe('N8nAlert', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nBadge from '../Badge.vue'; import N8nBadge from './Badge.vue';
describe('components', () => { describe('components', () => {
describe('N8nBadge', () => { describe('N8nBadge', () => {

View file

@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/vue'; import { render, screen } from '@testing-library/vue';
import N8nBlockUi from '../BlockUi.vue'; import N8nBlockUi from './BlockUi.vue';
describe('components', () => { describe('components', () => {
describe('N8nBlockUi', () => { describe('N8nBlockUi', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nButton from '../Button.vue'; import N8nButton from './Button.vue';
const slots = { const slots = {
default: 'Button', default: 'Button',

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nCallout from '../Callout.vue'; import N8nCallout from './Callout.vue';
describe('components', () => { describe('components', () => {
describe('N8nCallout', () => { describe('N8nCallout', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nCard from '../Card.vue'; import N8nCard from './Card.vue';
describe('components', () => { describe('components', () => {
describe('N8nCard', () => { describe('N8nCard', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nCheckbox from '../Checkbox.vue'; import N8nCheckbox from './Checkbox.vue';
describe('components', () => { describe('components', () => {
describe('N8nCheckbox', () => { describe('N8nCheckbox', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8NCircleLoader from '../CircleLoader.vue'; import N8NCircleLoader from './CircleLoader.vue';
describe('N8NCircleLoader', () => { describe('N8NCircleLoader', () => {
it('should render correctly', () => { it('should render correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nColorPicker from '../ColorPicker.vue'; import N8nColorPicker from './ColorPicker.vue';
describe('components', () => { describe('components', () => {
describe('N8nColorPicker', () => { describe('N8nColorPicker', () => {

View file

@ -2,8 +2,8 @@ import { render } from '@testing-library/vue';
import { removeDynamicAttributes } from 'n8n-design-system/utils'; import { removeDynamicAttributes } from 'n8n-design-system/utils';
import { rows, columns } from './data'; import { rows, columns } from './__tests__/data';
import N8nDatatable from '../Datatable.vue'; import N8nDatatable from './Datatable.vue';
const stubs = [ const stubs = [
'n8n-option', 'n8n-option',

View file

@ -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); const render = createComponentRenderer(FormBox);

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nInfoTip from '../InfoTip.vue'; import N8nInfoTip from './InfoTip.vue';
const slots = { const slots = {
default: ['Need help doing something?', '<a href="/docs" target="_blank">Open docs</a>'], default: ['Need help doing something?', '<a href="/docs" target="_blank">Open docs</a>'],

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nInput from '../Input.vue'; import N8nInput from './Input.vue';
describe('N8nInput', () => { describe('N8nInput', () => {
it('should render correctly', () => { it('should render correctly', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import InputLabel from '../InputLabel.vue'; import InputLabel from './InputLabel.vue';
describe('component', () => { describe('component', () => {
describe('Text overflow behavior', () => { describe('Text overflow behavior', () => {

View file

@ -2,7 +2,7 @@ import { render, fireEvent } from '@testing-library/vue';
import { n8nHtml } from 'n8n-design-system/directives'; import { n8nHtml } from 'n8n-design-system/directives';
import N8nMarkdown from '../Markdown.vue'; import N8nMarkdown from './Markdown.vue';
describe('components', () => { describe('components', () => {
describe('N8nMarkdown', () => { describe('N8nMarkdown', () => {

View file

@ -3,7 +3,7 @@ import { configure, render, waitFor } from '@testing-library/vue';
import { h } from 'vue'; import { h } from 'vue';
import { createRouter, createWebHistory } from 'vue-router'; import { createRouter, createWebHistory } from 'vue-router';
import NavigationDropdown from '../NavigationDropdown.vue'; import NavigationDropdown from './NavigationDropdown.vue';
configure({ testIdAttribute: 'data-test-id' }); configure({ testIdAttribute: 'data-test-id' });

View file

@ -3,7 +3,7 @@ import { render } from '@testing-library/vue';
import { N8nText } from 'n8n-design-system/components'; import { N8nText } from 'n8n-design-system/components';
import { n8nHtml } from 'n8n-design-system/directives'; import { n8nHtml } from 'n8n-design-system/directives';
import N8nNotice from '../Notice.vue'; import N8nNotice from './Notice.vue';
describe('components', () => { describe('components', () => {
describe('N8nNotice', () => { describe('N8nNotice', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nRecycleScroller from '../RecycleScroller.vue'; import N8nRecycleScroller from './RecycleScroller.vue';
const itemSize = 100; const itemSize = 100;
const itemKey = 'id'; const itemKey = 'id';

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nRoute from '../Route.vue'; import N8nRoute from './Route.vue';
describe('N8nRoute', () => { describe('N8nRoute', () => {
it('should render internal router links', () => { it('should render internal router links', () => {

View file

@ -4,8 +4,8 @@ import { defineComponent, ref } from 'vue';
import { removeDynamicAttributes } from 'n8n-design-system/utils'; 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('components', () => {
describe('N8nSelect', () => { describe('N8nSelect', () => {

View file

@ -1,7 +1,7 @@
import userEvent from '@testing-library/user-event'; import userEvent from '@testing-library/user-event';
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nTooltip from '../Tooltip.vue'; import N8nTooltip from './Tooltip.vue';
describe('components', () => { describe('components', () => {
describe('N8nTooltip', () => { describe('N8nTooltip', () => {

View file

@ -1,6 +1,6 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import N8nTree from '../Tree.vue'; import N8nTree from './Tree.vue';
describe('components', () => { describe('components', () => {
describe('N8nTree', () => { describe('N8nTree', () => {

View file

@ -2,7 +2,7 @@ import { render } from '@testing-library/vue';
import { N8nAvatar, N8nUserInfo } from 'n8n-design-system/main'; import { N8nAvatar, N8nUserInfo } from 'n8n-design-system/main';
import UserStack from '../UserStack.vue'; import UserStack from './UserStack.vue';
describe('UserStack', () => { describe('UserStack', () => {
it('should render flat user list', () => { it('should render flat user list', () => {

View file

@ -1,7 +1,7 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import { mock, mockClear } from 'vitest-mock-extended'; import { mock, mockClear } from 'vitest-mock-extended';
import ColorCircles from '../ColorCircles.vue'; import ColorCircles from './ColorCircles.vue';
describe('ColorCircles', () => { describe('ColorCircles', () => {
const mockCssDeclaration = mock<CSSStyleDeclaration>(); const mockCssDeclaration = mock<CSSStyleDeclaration>();

View file

@ -1,7 +1,7 @@
import { render } from '@testing-library/vue'; import { render } from '@testing-library/vue';
import { mock, mockClear } from 'vitest-mock-extended'; import { mock, mockClear } from 'vitest-mock-extended';
import Sizes from '../Sizes.vue'; import Sizes from './Sizes.vue';
describe('Sizes', () => { describe('Sizes', () => {
const mockCssDeclaration = mock<CSSStyleDeclaration>(); const mockCssDeclaration = mock<CSSStyleDeclaration>();

View file

@ -1,4 +1,4 @@
import { createEventBus } from '../event-bus'; import { createEventBus } from './event-bus';
describe('createEventBus()', () => { describe('createEventBus()', () => {
const eventBus = createEventBus(); const eventBus = createEventBus();

View file

@ -1,4 +1,4 @@
import { toggleCheckbox } from '../markdown'; import { toggleCheckbox } from './markdown';
describe('toggleCheckbox', () => { describe('toggleCheckbox', () => {
it('should do nothing when there are no checkboxes', () => { 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