From d8073efa94ec6df6f6c5bbd7dc534f3ff1646357 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Wed, 26 Jul 2023 10:33:57 +0300 Subject: [PATCH] fix: remove button override references --- .../N8nButton/__tests__/Button.spec.ts | 62 ------------------- .../__snapshots__/Button.spec.ts.snap | 8 --- 2 files changed, 70 deletions(-) diff --git a/packages/design-system/src/components/N8nButton/__tests__/Button.spec.ts b/packages/design-system/src/components/N8nButton/__tests__/Button.spec.ts index 16f053e930..9ead6c7344 100644 --- a/packages/design-system/src/components/N8nButton/__tests__/Button.spec.ts +++ b/packages/design-system/src/components/N8nButton/__tests__/Button.spec.ts @@ -1,6 +1,5 @@ import { render } from '@testing-library/vue'; import N8nButton from '../Button.vue'; -import ElButton from '../overrides/ElButton.vue'; const slots = { default: 'Button', @@ -65,66 +64,5 @@ describe('components', () => { }); }); }); - - describe('overrides', () => { - it('should use default (`primary`) type when no type is given', () => { - const wrapper = render(ElButton, { - props: { - icon: 'plus-circle', - }, - slots, - global: { - stubs, - }, - }); - - expect(wrapper.html()).toMatchSnapshot(); - }); - - it('should use given (`secondary`) type', () => { - const wrapper = render(ElButton, { - props: { - icon: 'plus-circle', - type: 'secondary', - }, - slots, - global: { - stubs, - }, - }); - - expect(wrapper.html()).toMatchSnapshot(); - }); - - it('should render as `secondary` when `text` is given as type', () => { - const wrapper = render(ElButton, { - props: { - icon: 'plus-circle', - type: 'text', - }, - slots, - global: { - stubs, - }, - }); - - expect(wrapper.html()).toMatchSnapshot(); - }); - - it('should render as `tertiary` when `info` is given as type', () => { - const wrapper = render(ElButton, { - props: { - icon: 'plus-circle', - type: 'info', - }, - slots, - global: { - stubs, - }, - }); - - expect(wrapper.html()).toMatchSnapshot(); - }); - }); }); }); diff --git a/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap b/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap index c48ac5e014..97079c01ef 100644 --- a/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap +++ b/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap @@ -1,13 +1,5 @@ // Vitest Snapshot v1 -exports[`components > N8nButton > overrides > should render as \`secondary\` when \`text\` is given as type 1`] = `""`; - -exports[`components > N8nButton > overrides > should render as \`tertiary\` when \`info\` is given as type 1`] = `""`; - -exports[`components > N8nButton > overrides > should use default (\`primary\`) type when no type is given 1`] = `""`; - -exports[`components > N8nButton > overrides > should use given (\`secondary\`) type 1`] = `""`; - exports[`components > N8nButton > props > icon > should render icon button 1`] = `""`; exports[`components > N8nButton > props > loading > should render loading spinner 1`] = `""`;