Skip to content

Commit

Permalink
update missing i18n and fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zhendi committed Feb 6, 2025
1 parent 3d068b0 commit d810a2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { describe, it, expect, beforeEach, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import ApplicationSpaceSettings from '@/components/application_spaces/ApplicationSpaceSettings.vue'
import { createPinia, setActivePinia } from 'pinia'
import { ElMessage } from 'element-plus'

vi.mock('element-plus', () => ({
Expand Down Expand Up @@ -52,7 +51,6 @@ const createWrapper = (props = {}) => {
...props
},
global: {
plugins: [createPinia()],
mocks: {
$t: (key) => key
}
Expand All @@ -64,7 +62,6 @@ describe('ApplicationSpaceSettings', () => {
let wrapper

beforeEach(() => {
setActivePinia(createPinia())
wrapper = createWrapper()
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { describe, it, expect, beforeEach, vi } from "vitest";
import { mount } from "@vue/test-utils";
import DatasetSettings from "@/components/datasets/DatasetSettings.vue";
import { createPinia, setActivePinia } from 'pinia';

// Mock the API response
vi.mock('../../../packs/useFetchApi', () => ({
Expand Down Expand Up @@ -75,7 +74,6 @@ const createWrapper = (props = {}) => {
...props
},
global: {
plugins: [createPinia()],
mocks: {
$t: (key) => key
}
Expand All @@ -84,10 +82,6 @@ const createWrapper = (props = {}) => {
};

describe("DatasetSettings", () => {
beforeEach(() => {
setActivePinia(createPinia());
});

it("mounts correctly", () => {
const wrapper = createWrapper();
expect(wrapper.vm).toBeDefined();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/evaluations/EvaluationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
/>
<template #empty>
<span v-if="error">{{ error }}</span>
<span v-else>{{ $t('common.noData') }}</span>
<span v-else>{{ $t('all.noData') }}</span>
</template>
</el-table>
</el-tab-pane>
Expand Down

0 comments on commit d810a2c

Please sign in to comment.