From e7e89cbb7a1047ed0ec4cc868b55ab48c6976c90 Mon Sep 17 00:00:00 2001 From: Caroline Desprat Date: Mon, 4 Nov 2024 15:51:00 +0000 Subject: [PATCH] refactor: move files to task directories --- components.d.ts | 4 +- src/components/ExtractingForm.vue | 230 ------------------ src/components/FindNamedEntitiesForm.vue | 197 --------------- .../ExtractingFormOcrControl.vue | 0 .../ExtractingLanguageFormControl.vue | 0 .../ExtractingFormOcrControl.spec.js | 2 +- .../ExtractingLanguageFormControl.spec.js | 2 +- .../TaskDocuments/TaskDocumentsForm.spec.js} | 4 +- .../FindNamedEntitiesForm.spec.js | 0 9 files changed, 6 insertions(+), 433 deletions(-) delete mode 100644 src/components/ExtractingForm.vue delete mode 100644 src/components/FindNamedEntitiesForm.vue rename src/components/{ => Task/TaskDocuments}/ExtractingFormOcrControl.vue (100%) rename src/components/{ => Task/TaskDocuments}/ExtractingLanguageFormControl.vue (100%) rename tests/unit/specs/components/{ => Task/TaskDocuments}/ExtractingFormOcrControl.spec.js (94%) rename tests/unit/specs/components/{ => Task/TaskDocuments}/ExtractingLanguageFormControl.spec.js (95%) rename tests/unit/specs/components/{ExtractingForm.spec.js => Task/TaskDocuments/TaskDocumentsForm.spec.js} (96%) rename tests/unit/specs/components/{ => Task/TaskEntities}/FindNamedEntitiesForm.spec.js (100%) diff --git a/components.d.ts b/components.d.ts index 1238a2a962..aee982f88c 100644 --- a/components.d.ts +++ b/components.d.ts @@ -295,8 +295,8 @@ declare module 'vue' { EntitySectionTitle: typeof import('./src/components/Entity/EntitySection/EntitySectionTitle.vue')['default'] Extensions: typeof import('./src/components/Extensions.vue')['default'] ExtractingForm: typeof import('./src/components/ExtractingForm.vue')['default'] - ExtractingFormOcrControl: typeof import('./src/components/ExtractingFormOcrControl.vue')['default'] - ExtractingLanguageFormControl: typeof import('./src/components/ExtractingLanguageFormControl.vue')['default'] + ExtractingFormOcrControl: typeof import('./src/components/Task/TaskDocuments/ExtractingFormOcrControl.vue')['default'] + ExtractingLanguageFormControl: typeof import('./src/components/Task/TaskDocuments/ExtractingLanguageFormControl.vue')['default'] FilterAbstract: typeof import('./src/components/Filter/types/FilterAbstract.vue')['default'] FilterBoilerplate: typeof import('./src/components/Filter/FilterBoilerplate.vue')['default'] FilterDate: typeof import('./src/components/Filter/types/FilterDate.vue')['default'] diff --git a/src/components/ExtractingForm.vue b/src/components/ExtractingForm.vue deleted file mode 100644 index c5c4a6427f..0000000000 --- a/src/components/ExtractingForm.vue +++ /dev/null @@ -1,230 +0,0 @@ - - - diff --git a/src/components/FindNamedEntitiesForm.vue b/src/components/FindNamedEntitiesForm.vue deleted file mode 100644 index 25eb23ea4d..0000000000 --- a/src/components/FindNamedEntitiesForm.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - - - diff --git a/src/components/ExtractingFormOcrControl.vue b/src/components/Task/TaskDocuments/ExtractingFormOcrControl.vue similarity index 100% rename from src/components/ExtractingFormOcrControl.vue rename to src/components/Task/TaskDocuments/ExtractingFormOcrControl.vue diff --git a/src/components/ExtractingLanguageFormControl.vue b/src/components/Task/TaskDocuments/ExtractingLanguageFormControl.vue similarity index 100% rename from src/components/ExtractingLanguageFormControl.vue rename to src/components/Task/TaskDocuments/ExtractingLanguageFormControl.vue diff --git a/tests/unit/specs/components/ExtractingFormOcrControl.spec.js b/tests/unit/specs/components/Task/TaskDocuments/ExtractingFormOcrControl.spec.js similarity index 94% rename from tests/unit/specs/components/ExtractingFormOcrControl.spec.js rename to tests/unit/specs/components/Task/TaskDocuments/ExtractingFormOcrControl.spec.js index 901185f7a4..63079087c6 100644 --- a/tests/unit/specs/components/ExtractingFormOcrControl.spec.js +++ b/tests/unit/specs/components/Task/TaskDocuments/ExtractingFormOcrControl.spec.js @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils' import { flushPromises } from '~tests/unit/tests_utils' import CoreSetup from '~tests/unit/CoreSetup' -import ExtractingFormOcrControl from '@/components/ExtractingFormOcrControl' +import ExtractingFormOcrControl from '@/components/Task/TaskDocuments/ExtractingFormOcrControl' const OCR_LANGUAGES = [ { name: 'CHINESE', iso6392: 'zho' }, diff --git a/tests/unit/specs/components/ExtractingLanguageFormControl.spec.js b/tests/unit/specs/components/Task/TaskDocuments/ExtractingLanguageFormControl.spec.js similarity index 95% rename from tests/unit/specs/components/ExtractingLanguageFormControl.spec.js rename to tests/unit/specs/components/Task/TaskDocuments/ExtractingLanguageFormControl.spec.js index 9800faf9c3..e6f1f426bb 100644 --- a/tests/unit/specs/components/ExtractingLanguageFormControl.spec.js +++ b/tests/unit/specs/components/Task/TaskDocuments/ExtractingLanguageFormControl.spec.js @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils' import { flushPromises } from '~tests/unit/tests_utils' import CoreSetup from '~tests/unit/CoreSetup' -import ExtractingLanguageFormControl from '@/components/ExtractingLanguageFormControl' +import ExtractingLanguageFormControl from '@/components/Task/TaskDocuments/ExtractingLanguageFormControl' const TEXT_LANGUAGES = [ { name: 'CHINESE', iso6392: 'zho' }, diff --git a/tests/unit/specs/components/ExtractingForm.spec.js b/tests/unit/specs/components/Task/TaskDocuments/TaskDocumentsForm.spec.js similarity index 96% rename from tests/unit/specs/components/ExtractingForm.spec.js rename to tests/unit/specs/components/Task/TaskDocuments/TaskDocumentsForm.spec.js index 89ac213d8f..461a96b3c0 100644 --- a/tests/unit/specs/components/ExtractingForm.spec.js +++ b/tests/unit/specs/components/Task/TaskDocuments/TaskDocumentsForm.spec.js @@ -2,8 +2,8 @@ import { shallowMount } from '@vue/test-utils' import CoreSetup from '~tests/unit/CoreSetup' import ExtractingForm from '@/components/ExtractingForm' - -describe('ExtractingForm.vue', () => { +// TODO file renamed but the tests have to be rewritten +describe('TaskDocumentsForm.vue', () => { let api, wrapper, core const props = { diff --git a/tests/unit/specs/components/FindNamedEntitiesForm.spec.js b/tests/unit/specs/components/Task/TaskEntities/FindNamedEntitiesForm.spec.js similarity index 100% rename from tests/unit/specs/components/FindNamedEntitiesForm.spec.js rename to tests/unit/specs/components/Task/TaskEntities/FindNamedEntitiesForm.spec.js