diff --git a/.circleci/main/executors.yml b/.circleci/main/executors.yml index 535f29488065..a8d43b1a3332 100644 --- a/.circleci/main/executors.yml +++ b/.circleci/main/executors.yml @@ -19,4 +19,4 @@ executors: image: ubuntu-2204:current ui-executor: docker: - - image: cimg/node:18.20.2 + - image: cimg/node:24.14.0 diff --git a/ui/package.json b/ui/package.json index e84a0f57b91a..4754cdd8492f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -121,7 +121,7 @@ "unplugin-auto-import": "^0.17.5", "unplugin-vue-components": "^0.26.0", "vite": "^6.4.1", - "vitest": "^4.0.15", + "vitest": "^4.1.0", "vitest-mock-extended": "^1.3.1", "vue-eslint-parser": "^9.3.1", "vue-tsc": "^2.2.12" diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml index 21d059d37852..00b07bb2b7be 100644 --- a/ui/pnpm-lock.yaml +++ b/ui/pnpm-lock.yaml @@ -301,11 +301,11 @@ importers: specifier: ^6.4.1 version: 6.4.1(@types/node@24.10.1)(sass@1.94.2) vitest: - specifier: ^4.0.15 - version: 4.0.15(@types/node@24.10.1)(happy-dom@9.20.3)(sass@1.94.2) + specifier: ^4.1.0 + version: 4.1.0(@types/node@24.10.1)(happy-dom@9.20.3)(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2)) vitest-mock-extended: specifier: ^1.3.1 - version: 1.3.2(typescript@5.4.5)(vitest@4.0.15(@types/node@24.10.1)(happy-dom@9.20.3)(sass@1.94.2)) + version: 1.3.2(typescript@5.4.5)(vitest@4.1.0(@types/node@24.10.1)(happy-dom@9.20.3)(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2))) vue-eslint-parser: specifier: ^9.3.1 version: 9.4.3(eslint@8.57.1) @@ -900,8 +900,8 @@ packages: '@scarf/scarf@1.4.0': resolution: {integrity: sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==} - '@standard-schema/spec@1.0.0': - resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} '@swagger-api/apidom-ast@1.0.0-rc.4': resolution: {integrity: sha512-IaXz00VLMq0Kw5vh5f2MX4gNWzPy8ujBl5FInM5w+1mezoyrwTnVRiKO7sf611OthmNmnK5cWy3hjqURAT9wCQ==} @@ -1234,34 +1234,34 @@ packages: vite: ^5.0.0 || ^6.0.0 vue: ^3.2.25 - '@vitest/expect@4.0.15': - resolution: {integrity: sha512-Gfyva9/GxPAWXIWjyGDli9O+waHDC0Q0jaLdFP1qPAUUfo1FEXPXUfUkp3eZA0sSq340vPycSyOlYUeM15Ft1w==} + '@vitest/expect@4.1.0': + resolution: {integrity: sha512-EIxG7k4wlWweuCLG9Y5InKFwpMEOyrMb6ZJ1ihYu02LVj/bzUwn2VMU+13PinsjRW75XnITeFrQBMH5+dLvCDA==} - '@vitest/mocker@4.0.15': - resolution: {integrity: sha512-CZ28GLfOEIFkvCFngN8Sfx5h+Se0zN+h4B7yOsPVCcgtiO7t5jt9xQh2E1UkFep+eb9fjyMfuC5gBypwb07fvQ==} + '@vitest/mocker@4.1.0': + resolution: {integrity: sha512-evxREh+Hork43+Y4IOhTo+h5lGmVRyjqI739Rz4RlUPqwrkFFDF6EMvOOYjTx4E8Tl6gyCLRL8Mu7Ry12a13Tw==} peerDependencies: msw: ^2.4.9 - vite: ^6.0.0 || ^7.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@4.0.15': - resolution: {integrity: sha512-SWdqR8vEv83WtZcrfLNqlqeQXlQLh2iilO1Wk1gv4eiHKjEzvgHb2OVc3mIPyhZE6F+CtfYjNlDJwP5MN6Km7A==} + '@vitest/pretty-format@4.1.0': + resolution: {integrity: sha512-3RZLZlh88Ib0J7NQTRATfc/3ZPOnSUn2uDBUoGNn5T36+bALixmzphN26OUD3LRXWkJu4H0s5vvUeqBiw+kS0A==} - '@vitest/runner@4.0.15': - resolution: {integrity: sha512-+A+yMY8dGixUhHmNdPUxOh0la6uVzun86vAbuMT3hIDxMrAOmn5ILBHm8ajrqHE0t8R9T1dGnde1A5DTnmi3qw==} + '@vitest/runner@4.1.0': + resolution: {integrity: sha512-Duvx2OzQ7d6OjchL+trw+aSrb9idh7pnNfxrklo14p3zmNL4qPCDeIJAK+eBKYjkIwG96Bc6vYuxhqDXQOWpoQ==} - '@vitest/snapshot@4.0.15': - resolution: {integrity: sha512-A7Ob8EdFZJIBjLjeO0DZF4lqR6U7Ydi5/5LIZ0xcI+23lYlsYJAfGn8PrIWTYdZQRNnSRlzhg0zyGu37mVdy5g==} + '@vitest/snapshot@4.1.0': + resolution: {integrity: sha512-0Vy9euT1kgsnj1CHttwi9i9o+4rRLEaPRSOJ5gyv579GJkNpgJK+B4HSv/rAWixx2wdAFci1X4CEPjiu2bXIMg==} - '@vitest/spy@4.0.15': - resolution: {integrity: sha512-+EIjOJmnY6mIfdXtE/bnozKEvTC4Uczg19yeZ2vtCz5Yyb0QQ31QWVQ8hswJ3Ysx/K2EqaNsVanjr//2+P3FHw==} + '@vitest/spy@4.1.0': + resolution: {integrity: sha512-pz77k+PgNpyMDv2FV6qmk5ZVau6c3R8HC8v342T2xlFxQKTrSeYw9waIJG8KgV9fFwAtTu4ceRzMivPTH6wSxw==} - '@vitest/utils@4.0.15': - resolution: {integrity: sha512-HXjPW2w5dxhTD0dLwtYHDnelK3j8sR8cWIaLxr22evTyY6q8pRCjZSmhRWVjBaOVXChQd6AwMzi9pucorXCPZA==} + '@vitest/utils@4.1.0': + resolution: {integrity: sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw==} '@volar/language-core@2.4.15': resolution: {integrity: sha512-3VHw+QZU0ZG9IuQmzT68IyN4hZNd9GchGPhbD9+pa8CVv7rnoOZwo7T8weIbrRmihqy3ATpdfXFnqRrfPVK6CA==} @@ -1482,8 +1482,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - chai@6.2.1: - resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} chalk@4.1.2: @@ -1545,6 +1545,9 @@ packages: resolution: {integrity: sha512-lOETlkIeYSJWcbbcvjRKGxVMXJR+8+OQb/mTPbA4ObPMytYIsUbuOE0Jzy60hjARYszq1id0j8KgVhC+WGZVTg==} engines: {node: '>=12'} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + core-js-pure@3.47.0: resolution: {integrity: sha512-BcxeDbzUrRnXGYIVAGFtcGQVNpFcUhVjr6W7F8XktvQW2iJP9e66GP6xdKotCRFlrxBvNIBrhwKteRXqMV86Nw==} @@ -1826,8 +1829,8 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-module-lexer@1.7.0: - resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-module-lexer@2.0.0: + resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} @@ -1902,8 +1905,8 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - expect-type@1.2.2: - resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} exsolve@1.0.8: @@ -2631,8 +2634,8 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@3.10.0: - resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + std-env@4.0.0: + resolution: {integrity: sha512-zUMPtQ/HBY3/50VbpkupYHbRroTRZJPRLvreamgErJVys0ceuzMkD44J/QjqhHjOzK42GQ3QZIeFG1OYfOtKqQ==} string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} @@ -2856,20 +2859,21 @@ packages: typescript: 3.x || 4.x || 5.x vitest: '>=2.0.0' - vitest@4.0.15: - resolution: {integrity: sha512-n1RxDp8UJm6N0IbJLQo+yzLZ2sQCDyl1o0LeugbPWf8+8Fttp29GghsQBjYJVmWq3gBFfe9Hs1spR44vovn2wA==} + vitest@4.1.0: + resolution: {integrity: sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.0.15 - '@vitest/browser-preview': 4.0.15 - '@vitest/browser-webdriverio': 4.0.15 - '@vitest/ui': 4.0.15 + '@vitest/browser-playwright': 4.1.0 + '@vitest/browser-preview': 4.1.0 + '@vitest/browser-webdriverio': 4.1.0 + '@vitest/ui': 4.1.0 happy-dom: '*' jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -3694,7 +3698,7 @@ snapshots: '@scarf/scarf@1.4.0': {} - '@standard-schema/spec@1.0.0': {} + '@standard-schema/spec@1.1.0': {} '@swagger-api/apidom-ast@1.0.0-rc.4': dependencies: @@ -4328,43 +4332,45 @@ snapshots: vite: 6.4.1(@types/node@24.10.1)(sass@1.94.2) vue: 3.5.25(typescript@5.4.5) - '@vitest/expect@4.0.15': + '@vitest/expect@4.1.0': dependencies: - '@standard-schema/spec': 1.0.0 + '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.0.15 - '@vitest/utils': 4.0.15 - chai: 6.2.1 + '@vitest/spy': 4.1.0 + '@vitest/utils': 4.1.0 + chai: 6.2.2 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.15(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2))': + '@vitest/mocker@4.1.0(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2))': dependencies: - '@vitest/spy': 4.0.15 + '@vitest/spy': 4.1.0 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: vite: 6.4.1(@types/node@24.10.1)(sass@1.94.2) - '@vitest/pretty-format@4.0.15': + '@vitest/pretty-format@4.1.0': dependencies: tinyrainbow: 3.0.3 - '@vitest/runner@4.0.15': + '@vitest/runner@4.1.0': dependencies: - '@vitest/utils': 4.0.15 + '@vitest/utils': 4.1.0 pathe: 2.0.3 - '@vitest/snapshot@4.0.15': + '@vitest/snapshot@4.1.0': dependencies: - '@vitest/pretty-format': 4.0.15 + '@vitest/pretty-format': 4.1.0 + '@vitest/utils': 4.1.0 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.0.15': {} + '@vitest/spy@4.1.0': {} - '@vitest/utils@4.0.15': + '@vitest/utils@4.1.0': dependencies: - '@vitest/pretty-format': 4.0.15 + '@vitest/pretty-format': 4.1.0 + convert-source-map: 2.0.0 tinyrainbow: 3.0.3 '@volar/language-core@2.4.15': @@ -4623,7 +4629,7 @@ snapshots: callsites@3.1.0: {} - chai@6.2.1: {} + chai@6.2.2: {} chalk@4.1.2: dependencies: @@ -4685,6 +4691,8 @@ snapshots: convert-hrtime@5.0.0: {} + convert-source-map@2.0.0: {} + core-js-pure@3.47.0: {} cronstrue@3.9.0: {} @@ -4967,7 +4975,7 @@ snapshots: es-errors@1.3.0: {} - es-module-lexer@1.7.0: {} + es-module-lexer@2.0.0: {} es-object-atoms@1.1.1: dependencies: @@ -5105,7 +5113,7 @@ snapshots: esutils@2.0.3: {} - expect-type@1.2.2: {} + expect-type@1.3.0: {} exsolve@1.0.8: {} @@ -5767,7 +5775,7 @@ snapshots: stackback@0.0.2: {} - std-env@3.10.0: {} + std-env@4.0.0: {} string-width@4.2.3: dependencies: @@ -5997,28 +6005,28 @@ snapshots: fsevents: 2.3.3 sass: 1.94.2 - vitest-mock-extended@1.3.2(typescript@5.4.5)(vitest@4.0.15(@types/node@24.10.1)(happy-dom@9.20.3)(sass@1.94.2)): + vitest-mock-extended@1.3.2(typescript@5.4.5)(vitest@4.1.0(@types/node@24.10.1)(happy-dom@9.20.3)(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2))): dependencies: ts-essentials: 10.1.1(typescript@5.4.5) typescript: 5.4.5 - vitest: 4.0.15(@types/node@24.10.1)(happy-dom@9.20.3)(sass@1.94.2) - - vitest@4.0.15(@types/node@24.10.1)(happy-dom@9.20.3)(sass@1.94.2): - dependencies: - '@vitest/expect': 4.0.15 - '@vitest/mocker': 4.0.15(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2)) - '@vitest/pretty-format': 4.0.15 - '@vitest/runner': 4.0.15 - '@vitest/snapshot': 4.0.15 - '@vitest/spy': 4.0.15 - '@vitest/utils': 4.0.15 - es-module-lexer: 1.7.0 - expect-type: 1.2.2 + vitest: 4.1.0(@types/node@24.10.1)(happy-dom@9.20.3)(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2)) + + vitest@4.1.0(@types/node@24.10.1)(happy-dom@9.20.3)(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2)): + dependencies: + '@vitest/expect': 4.1.0 + '@vitest/mocker': 4.1.0(vite@6.4.1(@types/node@24.10.1)(sass@1.94.2)) + '@vitest/pretty-format': 4.1.0 + '@vitest/runner': 4.1.0 + '@vitest/snapshot': 4.1.0 + '@vitest/spy': 4.1.0 + '@vitest/utils': 4.1.0 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 picomatch: 4.0.3 - std-env: 3.10.0 + std-env: 4.0.0 tinybench: 2.9.0 tinyexec: 1.0.2 tinyglobby: 0.2.15 @@ -6029,17 +6037,7 @@ snapshots: '@types/node': 24.10.1 happy-dom: 9.20.3 transitivePeerDependencies: - - jiti - - less - - lightningcss - msw - - sass - - sass-embedded - - stylus - - sugarss - - terser - - tsx - - yaml vkbeautify@0.99.3: {} diff --git a/ui/src/components/TrapConfiguration/CreateSnmpV3User.vue b/ui/src/components/TrapConfiguration/CreateSnmpV3User.vue new file mode 100644 index 000000000000..9eddeda31578 --- /dev/null +++ b/ui/src/components/TrapConfiguration/CreateSnmpV3User.vue @@ -0,0 +1,235 @@ + + + + + + diff --git a/ui/src/components/TrapConfiguration/GeneralConfiguration.vue b/ui/src/components/TrapConfiguration/GeneralConfiguration.vue new file mode 100644 index 000000000000..f8870e0b533a --- /dev/null +++ b/ui/src/components/TrapConfiguration/GeneralConfiguration.vue @@ -0,0 +1,219 @@ + + + + + + diff --git a/ui/src/components/TrapConfiguration/SearchExistingCredential.vue b/ui/src/components/TrapConfiguration/SearchExistingCredential.vue new file mode 100644 index 000000000000..860a6f691bb9 --- /dev/null +++ b/ui/src/components/TrapConfiguration/SearchExistingCredential.vue @@ -0,0 +1,178 @@ + + + + + + diff --git a/ui/src/components/TrapConfiguration/SnmpV3UserManagement.vue b/ui/src/components/TrapConfiguration/SnmpV3UserManagement.vue new file mode 100644 index 000000000000..a0ef08253e37 --- /dev/null +++ b/ui/src/components/TrapConfiguration/SnmpV3UserManagement.vue @@ -0,0 +1,200 @@ + + + + + + diff --git a/ui/src/containers/TrapConfiguration.vue b/ui/src/containers/TrapConfiguration.vue new file mode 100644 index 000000000000..33324cc8cbec --- /dev/null +++ b/ui/src/containers/TrapConfiguration.vue @@ -0,0 +1,68 @@ + + + + + + diff --git a/ui/src/main/router/index.ts b/ui/src/main/router/index.ts index 4a20fcf05b90..5c6b0d184f43 100644 --- a/ui/src/main/router/index.ts +++ b/ui/src/main/router/index.ts @@ -286,6 +286,11 @@ const router = createRouter({ name: 'Event Configuration Create', component: () => import('@/containers/EventConfigEventCreate.vue') }, + { + path: '/trap-config', + name: 'Trap Configuration', + component: () => import('@/containers/TrapConfiguration.vue') + }, { path: '/:pathMatch(.*)*', // catch other paths and redirect redirect: '/' diff --git a/ui/src/stores/trapConfigStore.ts b/ui/src/stores/trapConfigStore.ts new file mode 100644 index 000000000000..b968e9cc68a4 --- /dev/null +++ b/ui/src/stores/trapConfigStore.ts @@ -0,0 +1,34 @@ +import { CreateEditMode } from '@/types' +import { TrapConfigStoreState } from '@/types/trapConfig' +import { defineStore } from 'pinia' + +export const useTrapConfigStore = defineStore('useTrapConfigStore', { + state: (): TrapConfigStoreState => ({ + isLoading: false, + activeTab: 0, + credentialDrawerState: { + visible: false + }, + createUserDrawerState: { + visible: false, + mode: CreateEditMode.None + } + }), + actions: { + openCredentialDrawer() { + this.credentialDrawerState.visible = true + }, + closeCredentialDrawer() { + this.credentialDrawerState.visible = false + }, + openCreateUserDrawer(mode: CreateEditMode) { + this.createUserDrawerState.visible = true + this.createUserDrawerState.mode = mode + }, + closeCreateUserDrawer() { + this.createUserDrawerState.visible = false + this.createUserDrawerState.mode = CreateEditMode.None + } + } +}) + diff --git a/ui/src/types/trapConfig.d.ts b/ui/src/types/trapConfig.d.ts new file mode 100644 index 000000000000..e09be1d468cb --- /dev/null +++ b/ui/src/types/trapConfig.d.ts @@ -0,0 +1,14 @@ +import { CreateEditMode } from '.' + +export interface TrapConfigStoreState { + isLoading: boolean + activeTab: number + credentialDrawerState: { + visible: boolean + } + createUserDrawerState: { + visible: boolean + mode: CreateEditMode + } +} + diff --git a/ui/tests/components/EventConfiguration/EventConfigTabContainer.test.ts b/ui/tests/components/EventConfiguration/EventConfigTabContainer.test.ts index c17935c4656b..1d52d765a90b 100644 --- a/ui/tests/components/EventConfiguration/EventConfigTabContainer.test.ts +++ b/ui/tests/components/EventConfiguration/EventConfigTabContainer.test.ts @@ -8,6 +8,10 @@ import EventConfigUploadFilesTab from '@/components/EventConfiguration/EventConf import { FeatherTab, FeatherTabContainer, FeatherTabPanel } from '@featherds/tabs' import { FeatherButton } from '@featherds/button' +vi.mock('vue-router', () => ({ + useRouter: () => vi.fn() +})) + describe('EventConfigTabContainer', () => { let wrapper: VueWrapper let store: ReturnType @@ -17,10 +21,6 @@ describe('EventConfigTabContainer', () => { createSpy: vi.fn }) - vi.mock('vue-router', () => ({ - useRouter: () => vi.fn() - })) - store = useEventConfigStore(pinia) store.activeTab = 0 wrapper = mount(EventConfigTabContainer, {