From 65f59783477dbbb70b464aaea17906b204cdae18 Mon Sep 17 00:00:00 2001 From: Moritz Kirmse Date: Fri, 3 May 2024 16:34:27 +0200 Subject: [PATCH] Revert "test does not work :-(" This reverts commit c620f6e12caa0d71c6031b09bd83633c29443940. --- .../style-selector/style-selector.spec.ts | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/components/style-selector/style-selector.spec.ts diff --git a/src/components/style-selector/style-selector.spec.ts b/src/components/style-selector/style-selector.spec.ts deleted file mode 100644 index 765308fc..00000000 --- a/src/components/style-selector/style-selector.spec.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { shallowMount } from '@vue/test-utils' - -import StyleSelector from './style-selector.vue' -import { useStyleStore } from '@/stores/style.store' -import { createTestingPinia } from '@pinia/testing' - -describe('StyleEditor', () => { - createTestingPinia({ - createSpy: vi.fn, - initialState: { - style: { - bgStyle: undefined, - bgVectorSources: [ - { - 556: { - label: 'road', - defaultMapBoxStyle: 'http://tiles.lu/style.json', - defaultMapBoxStyleXYZ: 'http://tiles.lu/{z}/{x}/{y}.png', - xyz: 'http://tiles.lu/{z}/{x}/{y}.png', - xyz_custom: undefined, - style: 'http://tiles.lu/style.json', - }, - }, - ], - }, - }, - stubActions: false, - }) - const styleStore = useStyleStore() - - it('reset expert style test', async () => { - const wrapper = shallowMount(StyleSelector, { - props: { - isOpen: true, - }, - }) - - styleStore.setSimpleStyle(null) - expect(styleStore.bgStyle).toBeDefined - if (styleStore.bgStyle) { - expect(styleStore.bgStyle[0].label).toBe('Roads primary') - expect(styleStore.bgStyle[0].color).toBe('#f7f7f7') - } - expect(wrapper.findAll('button').length).toBe(0) - styleStore.enableExpertStyle() - expect(wrapper.findAll('button').length).toBe(1) - wrapper.vm.resetStyle() - expect(wrapper.findAll('button').length).toBe(0) - }) -})