@geode/opengeodeweb-front 10.6.2 → 10.6.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -1
- package/.oxlintrc.json +3 -22
- package/app/assets/geode_objects.js +26 -26
- package/app/components/Carousel.vue +62 -66
- package/app/components/CrsSelector.vue +48 -52
- package/app/components/DeleteDialog.vue +21 -37
- package/app/components/DragAndDrop.vue +35 -41
- package/app/components/ExtensionSelector.vue +50 -63
- package/app/components/FeedBack/ErrorBanner.vue +7 -10
- package/app/components/FeedBack/Snackers.vue +12 -14
- package/app/components/FetchingData.vue +1 -6
- package/app/components/FileSelector.vue +41 -47
- package/app/components/FileUploader.vue +62 -79
- package/app/components/GlassCard.vue +19 -19
- package/app/components/HybridRenderingView.vue +37 -38
- package/app/components/InfraConnected.vue +3 -3
- package/app/components/Inspector/InspectionButton.vue +27 -31
- package/app/components/Inspector/ResultPanel.vue +13 -24
- package/app/components/Launcher.vue +13 -13
- package/app/components/Loading.vue +63 -69
- package/app/components/MissingFilesSelector.vue +53 -73
- package/app/components/ObjectSelector.vue +81 -99
- package/app/components/PackagesVersions.vue +27 -30
- package/app/components/Recaptcha.vue +60 -71
- package/app/components/RemoteRenderingView.vue +102 -108
- package/app/components/Screenshot.vue +36 -42
- package/app/components/SearchBar.vue +5 -5
- package/app/components/Step.vue +37 -44
- package/app/components/Stepper.vue +29 -35
- package/app/components/VeaseViewToolbar.vue +69 -78
- package/app/components/ViewToolbar.vue +41 -45
- package/app/components/Viewer/BreadCrumb.vue +18 -30
- package/app/components/Viewer/ContextMenu.vue +176 -179
- package/app/components/Viewer/ContextMenuItem.vue +105 -117
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +6 -9
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +82 -93
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +84 -99
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +83 -98
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +62 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -108
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +82 -105
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +19 -23
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +26 -30
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +6 -9
- package/app/components/Viewer/Options/AttributeColorBar.vue +8 -8
- package/app/components/Viewer/Options/AttributeSelector.vue +73 -78
- package/app/components/Viewer/Options/ColorMapList.vue +115 -140
- package/app/components/Viewer/Options/ColorMapPicker.vue +128 -142
- package/app/components/Viewer/Options/ColorPicker.vue +9 -9
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -91
- package/app/components/Viewer/Options/TextureItem.vue +54 -58
- package/app/components/Viewer/Options/TexturesSelector.vue +22 -26
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +61 -68
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +83 -103
- package/app/components/Viewer/Solid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Solid/PointsOptions.vue +6 -9
- package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +82 -105
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +5 -5
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +5 -5
- package/app/components/Viewer/Tree/ObjectTree.vue +80 -89
- package/app/components/Viewer/TreeComponent.vue +43 -49
- package/app/components/Viewer/TreeObject.vue +48 -50
- package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +5 -5
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +5 -5
- package/app/components/Wrapper.vue +8 -8
- package/app/components/ZScaling.vue +18 -27
- package/app/composables/project_manager.js +57 -67
- package/app/composables/run_function_when_microservices_connected.js +8 -8
- package/app/plugins/auto_store_register.js +11 -13
- package/app/stores/app.js +118 -138
- package/app/stores/data.js +52 -68
- package/app/stores/data_style.js +36 -36
- package/app/stores/feedback.js +17 -20
- package/app/stores/geode.js +54 -55
- package/app/stores/hybrid_viewer.js +164 -177
- package/app/stores/infra.js +45 -55
- package/app/stores/lambda.js +26 -26
- package/app/stores/menu.js +78 -85
- package/app/stores/treeview.js +57 -65
- package/app/stores/viewer.js +92 -104
- package/app/utils/colormap.js +3 -3
- package/app/utils/config.js +16 -22
- package/app/utils/default_styles.js +50 -62
- package/app/utils/extension.js +44 -44
- package/app/utils/file_import_workflow.js +50 -64
- package/app/utils/local/app_mode.js +2 -2
- package/app/utils/local/cleanup.js +66 -72
- package/app/utils/local/microservices.js +61 -71
- package/app/utils/local/path.js +16 -19
- package/app/utils/local/scripts.js +22 -22
- package/app/utils/recaptcha.js +6 -6
- package/app/utils/server.js +21 -24
- package/app/utils/status.js +2 -2
- package/app/utils/treeview.js +4 -4
- package/app/utils/validate_schema.js +7 -7
- package/commitlint.config.js +2 -2
- package/eslint.config.js +4 -4
- package/internal/database/database.js +38 -46
- package/internal/database/extended_database.js +9 -10
- package/internal/database/tables/data.js +2 -3
- package/internal/database/tables/model_components.js +1 -1
- package/internal/database/tables/model_components_relation.js +1 -1
- package/internal/stores/data_style/mesh/cells/cell.js +47 -63
- package/internal/stores/data_style/mesh/cells/color.js +11 -16
- package/internal/stores/data_style/mesh/cells/common.js +6 -6
- package/internal/stores/data_style/mesh/cells/index.js +37 -47
- package/internal/stores/data_style/mesh/cells/textures.js +11 -12
- package/internal/stores/data_style/mesh/cells/vertex.js +47 -58
- package/internal/stores/data_style/mesh/cells/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/color.js +11 -16
- package/internal/stores/data_style/mesh/edges/common.js +6 -6
- package/internal/stores/data_style/mesh/edges/edge.js +47 -63
- package/internal/stores/data_style/mesh/edges/index.js +38 -52
- package/internal/stores/data_style/mesh/edges/vertex.js +47 -58
- package/internal/stores/data_style/mesh/edges/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/width.js +11 -16
- package/internal/stores/data_style/mesh/index.js +34 -34
- package/internal/stores/data_style/mesh/points/color.js +11 -16
- package/internal/stores/data_style/mesh/points/common.js +6 -6
- package/internal/stores/data_style/mesh/points/index.js +35 -49
- package/internal/stores/data_style/mesh/points/size.js +11 -16
- package/internal/stores/data_style/mesh/points/vertex.js +47 -58
- package/internal/stores/data_style/mesh/points/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polygons/color.js +11 -16
- package/internal/stores/data_style/mesh/polygons/common.js +6 -6
- package/internal/stores/data_style/mesh/polygons/index.js +36 -45
- package/internal/stores/data_style/mesh/polygons/polygon.js +45 -56
- package/internal/stores/data_style/mesh/polygons/textures.js +11 -16
- package/internal/stores/data_style/mesh/polygons/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polygons/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/color.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/common.js +6 -6
- package/internal/stores/data_style/mesh/polyhedra/index.js +29 -42
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +43 -47
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +11 -17
- package/internal/stores/data_style/model/blocks/color.js +21 -24
- package/internal/stores/data_style/model/blocks/common.js +6 -6
- package/internal/stores/data_style/model/blocks/index.js +13 -17
- package/internal/stores/data_style/model/blocks/visibility.js +21 -24
- package/internal/stores/data_style/model/corners/color.js +21 -24
- package/internal/stores/data_style/model/corners/common.js +6 -6
- package/internal/stores/data_style/model/corners/index.js +14 -18
- package/internal/stores/data_style/model/corners/visibility.js +21 -25
- package/internal/stores/data_style/model/edges/common.js +4 -4
- package/internal/stores/data_style/model/edges/index.js +7 -7
- package/internal/stores/data_style/model/edges/visibility.js +11 -15
- package/internal/stores/data_style/model/index.js +84 -100
- package/internal/stores/data_style/model/lines/color.js +21 -24
- package/internal/stores/data_style/model/lines/common.js +6 -6
- package/internal/stores/data_style/model/lines/index.js +13 -17
- package/internal/stores/data_style/model/lines/visibility.js +21 -24
- package/internal/stores/data_style/model/points/common.js +4 -4
- package/internal/stores/data_style/model/points/index.js +9 -9
- package/internal/stores/data_style/model/points/size.js +11 -11
- package/internal/stores/data_style/model/points/visibility.js +11 -15
- package/internal/stores/data_style/model/surfaces/color.js +21 -24
- package/internal/stores/data_style/model/surfaces/common.js +6 -6
- package/internal/stores/data_style/model/surfaces/index.js +14 -22
- package/internal/stores/data_style/model/surfaces/visibility.js +18 -22
- package/internal/stores/data_style/state.js +11 -11
- package/internal/utils/api_fetch.js +24 -34
- package/internal/utils/upload_file.js +19 -24
- package/internal/utils/viewer_call.js +23 -36
- package/nuxt.config.js +7 -11
- package/package.json +3 -3
- package/scripts/generate_geode_objects.js +14 -16
- package/server/api/app/kill.post.js +4 -4
- package/server/api/app/project_folder_path.post.js +11 -11
- package/server/api/app/run_back.post.js +12 -12
- package/server/api/app/run_viewer.post.js +12 -12
- package/server/api/extensions/run.post.js +34 -41
- package/server/api/extensions/upload.put.js +48 -62
- package/tests/integration/setup.js +43 -53
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +90 -116
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +81 -107
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +38 -41
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +85 -101
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +89 -113
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +81 -105
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +56 -73
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +59 -76
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +39 -42
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +31 -34
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +60 -73
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +52 -55
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +59 -80
- package/tests/integration/stores/viewer.nuxt.test.js +35 -38
- package/tests/setup_indexeddb.js +2 -2
- package/tests/unit/components/CrsSelector.nuxt.test.js +28 -28
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +33 -35
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -23
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +18 -18
- package/tests/unit/components/FileSelector.nuxt.test.js +57 -59
- package/tests/unit/components/FileUploader.nuxt.test.js +35 -39
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +28 -28
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +22 -27
- package/tests/unit/components/Launcher.nuxt.test.js +20 -22
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +37 -37
- package/tests/unit/components/ObjectSelector.nuxt.test.js +62 -62
- package/tests/unit/components/PackagesVersions.nuxt.test.js +16 -16
- package/tests/unit/components/Step.nuxt.test.js +18 -19
- package/tests/unit/components/Stepper.nuxt.test.js +18 -18
- package/tests/unit/composables/api_fetch.nuxt.test.js +34 -36
- package/tests/unit/composables/project_manager.nuxt.test.js +93 -112
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -36
- package/tests/unit/composables/upload_file.nuxt.test.js +27 -29
- package/tests/unit/plugins/project_load.nuxt.test.js +31 -33
- package/tests/unit/stores/app.nuxt.test.js +90 -92
- package/tests/unit/stores/feedback.nuxt.test.js +47 -57
- package/tests/unit/stores/geode.nuxt.test.js +111 -115
- package/tests/unit/stores/infra.nuxt.test.js +148 -148
- package/tests/unit/stores/lambda.nuxt.test.js +72 -74
- package/tests/unit/stores/treeview.nuxt.test.js +19 -21
- package/tests/unit/stores/viewer.nuxt.test.js +109 -122
- package/tests/unit/utils/recaptcha.nuxt.test.js +25 -29
- package/tests/unit/utils/validate_schema.nuxt.test.js +17 -17
- package/tests/utils.js +11 -11
- package/tests/vitest.config.js +9 -9
- package/vuetify_config.js +2 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import { beforeEach, describe, expect, test, vi } from "vitest"
|
|
3
|
-
import { mountSuspended } from "@nuxt/test-utils/runtime"
|
|
2
|
+
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
3
|
+
import { mountSuspended } from "@nuxt/test-utils/runtime";
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import { setupActivePinia, vuetify } from "@ogw_tests/utils"
|
|
7
|
-
import CrsSelector from "@ogw_front/components/CrsSelector"
|
|
8
|
-
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
6
|
+
import { setupActivePinia, vuetify } from "@ogw_tests/utils";
|
|
7
|
+
import CrsSelector from "@ogw_front/components/CrsSelector";
|
|
8
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
9
9
|
|
|
10
|
-
const EXPECTED_LENGTH = 1
|
|
11
|
-
const FIRST_INDEX = 0
|
|
10
|
+
const EXPECTED_LENGTH = 1;
|
|
11
|
+
const FIRST_INDEX = 0;
|
|
12
12
|
|
|
13
|
-
let pinia = undefined
|
|
14
|
-
let geodeStore = undefined
|
|
13
|
+
let pinia = undefined;
|
|
14
|
+
let geodeStore = undefined;
|
|
15
15
|
|
|
16
16
|
beforeEach(() => {
|
|
17
|
-
pinia = setupActivePinia()
|
|
18
|
-
geodeStore = useGeodeStore()
|
|
19
|
-
geodeStore.base_url = ""
|
|
20
|
-
})
|
|
17
|
+
pinia = setupActivePinia();
|
|
18
|
+
geodeStore = useGeodeStore();
|
|
19
|
+
geodeStore.base_url = "";
|
|
20
|
+
});
|
|
21
21
|
|
|
22
22
|
describe(CrsSelector, () => {
|
|
23
23
|
test(`Default behavior`, async () => {
|
|
@@ -27,31 +27,31 @@ describe(CrsSelector, () => {
|
|
|
27
27
|
code: "2000",
|
|
28
28
|
name: "Anguilla 1957 / British West Indies Grid",
|
|
29
29
|
},
|
|
30
|
-
]
|
|
30
|
+
];
|
|
31
31
|
|
|
32
32
|
// Mock geodeStore.request instead of registerEndpoint
|
|
33
33
|
geodeStore.request = vi.fn((schema, params, callbacks) => {
|
|
34
34
|
if (callbacks?.response_function) {
|
|
35
|
-
callbacks.response_function({ crs_list })
|
|
35
|
+
callbacks.response_function({ crs_list });
|
|
36
36
|
}
|
|
37
|
-
return Promise.resolve({ crs_list })
|
|
38
|
-
})
|
|
37
|
+
return Promise.resolve({ crs_list });
|
|
38
|
+
});
|
|
39
39
|
|
|
40
|
-
const key_to_update = "key"
|
|
40
|
+
const key_to_update = "key";
|
|
41
41
|
const wrapper = await mountSuspended(CrsSelector, {
|
|
42
42
|
global: {
|
|
43
43
|
plugins: [vuetify, pinia],
|
|
44
44
|
},
|
|
45
45
|
props: { geode_object_type: "BRep", key_to_update },
|
|
46
|
-
})
|
|
47
|
-
const td_wrapper = await wrapper.find("td")
|
|
48
|
-
await wrapper.vm.$nextTick()
|
|
49
|
-
const input = await td_wrapper.find("input")
|
|
50
|
-
await input.trigger("click")
|
|
51
|
-
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
52
|
-
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH)
|
|
46
|
+
});
|
|
47
|
+
const td_wrapper = await wrapper.find("td");
|
|
48
|
+
await wrapper.vm.$nextTick();
|
|
49
|
+
const input = await td_wrapper.find("input");
|
|
50
|
+
await input.trigger("click");
|
|
51
|
+
expect(wrapper.emitted()).toHaveProperty("update_values");
|
|
52
|
+
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH);
|
|
53
53
|
expect(wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX]).toEqual({
|
|
54
54
|
[key_to_update]: crs_list[FIRST_INDEX],
|
|
55
|
-
})
|
|
56
|
-
})
|
|
57
|
-
})
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import * as components from "vuetify/components"
|
|
3
|
-
import { beforeEach, describe, expect, test, vi } from "vitest"
|
|
4
|
-
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime"
|
|
5
|
-
import { nextTick } from "vue"
|
|
6
|
-
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
2
|
+
import * as components from "vuetify/components";
|
|
3
|
+
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
4
|
+
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime";
|
|
5
|
+
import { nextTick } from "vue";
|
|
6
|
+
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
7
7
|
|
|
8
8
|
// Local imports
|
|
9
|
-
import { setupActivePinia, vuetify } from "@ogw_tests/utils"
|
|
10
|
-
import ExtensionSelector from "@ogw_front/components/ExtensionSelector"
|
|
11
|
-
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
9
|
+
import { setupActivePinia, vuetify } from "@ogw_tests/utils";
|
|
10
|
+
import ExtensionSelector from "@ogw_front/components/ExtensionSelector";
|
|
11
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
12
12
|
|
|
13
|
-
const EXPECTED_LENGTH = 1
|
|
14
|
-
const FIRST_INDEX = 0
|
|
15
|
-
const SECOND_INDEX = 1
|
|
13
|
+
const EXPECTED_LENGTH = 1;
|
|
14
|
+
const FIRST_INDEX = 0;
|
|
15
|
+
const SECOND_INDEX = 1;
|
|
16
16
|
|
|
17
|
-
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions
|
|
17
|
+
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
|
|
18
18
|
|
|
19
|
-
const pinia = setupActivePinia()
|
|
20
|
-
const geodeStore = useGeodeStore()
|
|
19
|
+
const pinia = setupActivePinia();
|
|
20
|
+
const geodeStore = useGeodeStore();
|
|
21
21
|
|
|
22
22
|
beforeEach(() => {
|
|
23
|
-
geodeStore.base_url = ""
|
|
23
|
+
geodeStore.base_url = "";
|
|
24
24
|
|
|
25
25
|
geodeStore.request = vi.fn(() => {
|
|
26
26
|
const response = {
|
|
27
27
|
geode_objects_and_output_extensions: {
|
|
28
28
|
BRep: { msh: { is_saveable: true } },
|
|
29
29
|
},
|
|
30
|
-
}
|
|
31
|
-
return Promise.resolve(response)
|
|
32
|
-
})
|
|
33
|
-
})
|
|
30
|
+
};
|
|
31
|
+
return Promise.resolve(response);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
34
|
|
|
35
35
|
describe(ExtensionSelector, () => {
|
|
36
36
|
test(`Select geode_object & extension`, async () => {
|
|
37
|
-
const output_geode_object = "BRep"
|
|
38
|
-
const output_extension = "msh"
|
|
37
|
+
const output_geode_object = "BRep";
|
|
38
|
+
const output_extension = "msh";
|
|
39
39
|
|
|
40
40
|
registerEndpoint(schema.$id, {
|
|
41
41
|
method: schema.methods[FIRST_INDEX],
|
|
@@ -44,24 +44,22 @@ describe(ExtensionSelector, () => {
|
|
|
44
44
|
BRep: { msh: { is_saveable: true } },
|
|
45
45
|
},
|
|
46
46
|
}),
|
|
47
|
-
})
|
|
47
|
+
});
|
|
48
48
|
const wrapper = await mountSuspended(ExtensionSelector, {
|
|
49
49
|
global: {
|
|
50
50
|
plugins: [vuetify, pinia],
|
|
51
51
|
},
|
|
52
52
|
props: { geode_object_type: "BRep", filenames: ["test.toto"] },
|
|
53
|
-
})
|
|
54
|
-
await nextTick()
|
|
55
|
-
expect(wrapper.exists()).toBeTruthy()
|
|
56
|
-
const v_card = await wrapper.findAllComponents(components.VCard)
|
|
57
|
-
await v_card[SECOND_INDEX].trigger("click")
|
|
58
|
-
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
59
|
-
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH)
|
|
60
|
-
expect(
|
|
61
|
-
wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX],
|
|
62
|
-
).toStrictEqual({
|
|
53
|
+
});
|
|
54
|
+
await nextTick();
|
|
55
|
+
expect(wrapper.exists()).toBeTruthy();
|
|
56
|
+
const v_card = await wrapper.findAllComponents(components.VCard);
|
|
57
|
+
await v_card[SECOND_INDEX].trigger("click");
|
|
58
|
+
expect(wrapper.emitted()).toHaveProperty("update_values");
|
|
59
|
+
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH);
|
|
60
|
+
expect(wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX]).toStrictEqual({
|
|
63
61
|
output_geode_object,
|
|
64
62
|
output_extension,
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
})
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import { describe, expect, test, vi } from "vitest"
|
|
3
|
-
import { mount } from "@vue/test-utils"
|
|
2
|
+
import { describe, expect, test, vi } from "vitest";
|
|
3
|
+
import { mount } from "@vue/test-utils";
|
|
4
4
|
|
|
5
5
|
// Local imports
|
|
6
|
-
import { setupActivePinia, vuetify } from "@ogw_tests/utils"
|
|
7
|
-
import FeedBackErrorBanner from "@ogw_front/components/FeedBack/ErrorBanner"
|
|
8
|
-
import { useFeedbackStore } from "@ogw_front/stores/feedback"
|
|
6
|
+
import { setupActivePinia, vuetify } from "@ogw_tests/utils";
|
|
7
|
+
import FeedBackErrorBanner from "@ogw_front/components/FeedBack/ErrorBanner";
|
|
8
|
+
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
9
9
|
|
|
10
|
-
const CALLED_TIMES = 1
|
|
10
|
+
const CALLED_TIMES = 1;
|
|
11
11
|
|
|
12
12
|
describe(FeedBackErrorBanner, () => {
|
|
13
|
-
const pinia = setupActivePinia()
|
|
13
|
+
const pinia = setupActivePinia();
|
|
14
14
|
test(`Test reload`, async () => {
|
|
15
15
|
const wrapper = mount(FeedBackErrorBanner, {
|
|
16
16
|
global: {
|
|
17
17
|
plugins: [vuetify, pinia],
|
|
18
18
|
},
|
|
19
|
-
})
|
|
20
|
-
const reload_spy = vi.spyOn(wrapper.vm, "reload")
|
|
21
|
-
const feedbackStore = useFeedbackStore()
|
|
22
|
-
await feedbackStore.$patch({ server_error: true })
|
|
23
|
-
expect(feedbackStore.server_error).toBeTruthy()
|
|
24
|
-
const v_btn = wrapper.findAll(".v-btn")
|
|
25
|
-
await v_btn[0].trigger("click")
|
|
26
|
-
expect(reload_spy).toHaveBeenCalledTimes(CALLED_TIMES)
|
|
27
|
-
})
|
|
19
|
+
});
|
|
20
|
+
const reload_spy = vi.spyOn(wrapper.vm, "reload");
|
|
21
|
+
const feedbackStore = useFeedbackStore();
|
|
22
|
+
await feedbackStore.$patch({ server_error: true });
|
|
23
|
+
expect(feedbackStore.server_error).toBeTruthy();
|
|
24
|
+
const v_btn = wrapper.findAll(".v-btn");
|
|
25
|
+
await v_btn[0].trigger("click");
|
|
26
|
+
expect(reload_spy).toHaveBeenCalledTimes(CALLED_TIMES);
|
|
27
|
+
});
|
|
28
28
|
|
|
29
29
|
test(`Test delete error`, async () => {
|
|
30
30
|
const wrapper = mount(FeedBackErrorBanner, {
|
|
31
31
|
global: {
|
|
32
32
|
plugins: [vuetify, pinia],
|
|
33
33
|
},
|
|
34
|
-
})
|
|
35
|
-
const feedbackStore = useFeedbackStore()
|
|
36
|
-
const v_btn = wrapper.findAll(".v-btn")
|
|
37
|
-
await v_btn[1].trigger("click")
|
|
38
|
-
expect(feedbackStore.server_error).toBeFalsy()
|
|
39
|
-
})
|
|
40
|
-
})
|
|
34
|
+
});
|
|
35
|
+
const feedbackStore = useFeedbackStore();
|
|
36
|
+
const v_btn = wrapper.findAll(".v-btn");
|
|
37
|
+
await v_btn[1].trigger("click");
|
|
38
|
+
expect(feedbackStore.server_error).toBeFalsy();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import * as components from "vuetify/components"
|
|
3
|
-
import { describe, expect, test, vi } from "vitest"
|
|
4
|
-
import { mount } from "@vue/test-utils"
|
|
2
|
+
import * as components from "vuetify/components";
|
|
3
|
+
import { describe, expect, test, vi } from "vitest";
|
|
4
|
+
import { mount } from "@vue/test-utils";
|
|
5
5
|
|
|
6
6
|
// Local imports
|
|
7
|
-
import { setupActivePinia, vuetify } from "@ogw_tests/utils"
|
|
8
|
-
import FeedBackSnackers from "@ogw_front/components/FeedBack/Snackers"
|
|
9
|
-
import { useFeedbackStore } from "@ogw_front/stores/feedback"
|
|
7
|
+
import { setupActivePinia, vuetify } from "@ogw_tests/utils";
|
|
8
|
+
import FeedBackSnackers from "@ogw_front/components/FeedBack/Snackers";
|
|
9
|
+
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
10
10
|
|
|
11
|
-
vi.stubGlobal("visualViewport", new EventTarget())
|
|
11
|
+
vi.stubGlobal("visualViewport", new EventTarget());
|
|
12
12
|
|
|
13
|
-
describe(FeedBackSnackers,
|
|
13
|
+
describe(FeedBackSnackers, () => {
|
|
14
14
|
test(`Test delete error`, async () => {
|
|
15
|
-
const pinia = setupActivePinia()
|
|
16
|
-
const feedbackStore = useFeedbackStore()
|
|
15
|
+
const pinia = setupActivePinia();
|
|
16
|
+
const feedbackStore = useFeedbackStore();
|
|
17
17
|
feedbackStore.$patch({
|
|
18
18
|
feedbacks: [
|
|
19
19
|
{
|
|
@@ -24,7 +24,7 @@ describe(FeedBackSnackers, async () => {
|
|
|
24
24
|
description: "test description",
|
|
25
25
|
},
|
|
26
26
|
],
|
|
27
|
-
})
|
|
27
|
+
});
|
|
28
28
|
|
|
29
29
|
const wrapper = mount(
|
|
30
30
|
{
|
|
@@ -39,11 +39,11 @@ describe(FeedBackSnackers, async () => {
|
|
|
39
39
|
plugins: [vuetify, pinia],
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
-
)
|
|
42
|
+
);
|
|
43
43
|
|
|
44
|
-
expect(feedbackStore.feedbacks.length).toBe(1)
|
|
45
|
-
const v_btn = await wrapper.findComponent(components.VBtn)
|
|
46
|
-
await v_btn.trigger("click")
|
|
47
|
-
expect(feedbackStore.feedbacks.length).toBe(0)
|
|
48
|
-
})
|
|
49
|
-
})
|
|
44
|
+
expect(feedbackStore.feedbacks.length).toBe(1);
|
|
45
|
+
const v_btn = await wrapper.findComponent(components.VBtn);
|
|
46
|
+
await v_btn.trigger("click");
|
|
47
|
+
expect(feedbackStore.feedbacks.length).toBe(0);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import * as components from "vuetify/components"
|
|
3
|
-
import { describe, expect, test, vi } from "vitest"
|
|
4
|
-
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime"
|
|
5
|
-
import { flushPromises } from "@vue/test-utils"
|
|
6
|
-
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
2
|
+
import * as components from "vuetify/components";
|
|
3
|
+
import { describe, expect, test, vi } from "vitest";
|
|
4
|
+
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime";
|
|
5
|
+
import { flushPromises } from "@vue/test-utils";
|
|
6
|
+
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
7
7
|
|
|
8
8
|
// Local imports
|
|
9
|
-
import { setupActivePinia, vuetify } from "@ogw_tests/utils"
|
|
10
|
-
import FileSelector from "@ogw_front/components/FileSelector"
|
|
11
|
-
import FileUploader from "@ogw_front/components/FileUploader"
|
|
12
|
-
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
9
|
+
import { setupActivePinia, vuetify } from "@ogw_tests/utils";
|
|
10
|
+
import FileSelector from "@ogw_front/components/FileSelector";
|
|
11
|
+
import FileUploader from "@ogw_front/components/FileUploader";
|
|
12
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
13
13
|
|
|
14
|
-
const EXPECTED_LENGTH = 1
|
|
15
|
-
const FIRST_INDEX = 0
|
|
16
|
-
const SECOND_INDEX = 1
|
|
14
|
+
const EXPECTED_LENGTH = 1;
|
|
15
|
+
const FIRST_INDEX = 0;
|
|
16
|
+
const SECOND_INDEX = 1;
|
|
17
17
|
|
|
18
|
-
const allowed_files_schema = schemas.opengeodeweb_back.allowed_files
|
|
19
|
-
const upload_file_schema = schemas.opengeodeweb_back.upload_file
|
|
18
|
+
const allowed_files_schema = schemas.opengeodeweb_back.allowed_files;
|
|
19
|
+
const upload_file_schema = schemas.opengeodeweb_back.upload_file;
|
|
20
20
|
|
|
21
|
-
describe(FileSelector,
|
|
22
|
-
const pinia = setupActivePinia()
|
|
23
|
-
const geodeStore = useGeodeStore()
|
|
24
|
-
geodeStore.base_url = ""
|
|
21
|
+
describe(FileSelector, () => {
|
|
22
|
+
const pinia = setupActivePinia();
|
|
23
|
+
const geodeStore = useGeodeStore();
|
|
24
|
+
geodeStore.base_url = "";
|
|
25
25
|
|
|
26
26
|
test(`Select file`, async () => {
|
|
27
27
|
registerEndpoint(allowed_files_schema.$id, {
|
|
@@ -29,40 +29,40 @@ describe(FileSelector, async () => {
|
|
|
29
29
|
handler: () => ({
|
|
30
30
|
extensions: ["1", "2", "3"],
|
|
31
31
|
}),
|
|
32
|
-
})
|
|
32
|
+
});
|
|
33
33
|
const wrapper = await mountSuspended(FileSelector, {
|
|
34
34
|
global: {
|
|
35
35
|
plugins: [vuetify, pinia],
|
|
36
36
|
},
|
|
37
37
|
props: { multiple: false, auto_upload: false },
|
|
38
|
-
})
|
|
38
|
+
});
|
|
39
39
|
|
|
40
|
-
const file_uploader = wrapper.findComponent(FileUploader)
|
|
40
|
+
const file_uploader = wrapper.findComponent(FileUploader);
|
|
41
41
|
|
|
42
42
|
registerEndpoint(upload_file_schema.$id, {
|
|
43
43
|
method: upload_file_schema.methods[SECOND_INDEX],
|
|
44
44
|
handler: () => ({}),
|
|
45
|
-
})
|
|
45
|
+
});
|
|
46
46
|
|
|
47
|
-
const v_file_input = file_uploader.find('input[type="file"]')
|
|
48
|
-
const files = [new File(["fake_file"], "fake_file.txt")]
|
|
49
|
-
const auto_upload = false
|
|
47
|
+
const v_file_input = file_uploader.find('input[type="file"]');
|
|
48
|
+
const files = [new File(["fake_file"], "fake_file.txt")];
|
|
49
|
+
const auto_upload = false;
|
|
50
50
|
Object.defineProperty(v_file_input.element, "files", {
|
|
51
51
|
value: files,
|
|
52
52
|
writable: true,
|
|
53
|
-
})
|
|
54
|
-
await v_file_input.trigger("change")
|
|
55
|
-
const v_btn = wrapper.findComponent(components.VBtn)
|
|
56
|
-
await v_btn.trigger("click")
|
|
57
|
-
await flushPromises()
|
|
58
|
-
await flushPromises()
|
|
59
|
-
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
60
|
-
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH)
|
|
53
|
+
});
|
|
54
|
+
await v_file_input.trigger("change");
|
|
55
|
+
const v_btn = wrapper.findComponent(components.VBtn);
|
|
56
|
+
await v_btn.trigger("click");
|
|
57
|
+
await flushPromises();
|
|
58
|
+
await flushPromises();
|
|
59
|
+
expect(wrapper.emitted()).toHaveProperty("update_values");
|
|
60
|
+
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH);
|
|
61
61
|
expect(wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX]).toEqual({
|
|
62
62
|
files,
|
|
63
63
|
auto_upload,
|
|
64
|
-
})
|
|
65
|
-
})
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
66
|
|
|
67
67
|
describe(FileSelector, () => {
|
|
68
68
|
registerEndpoint(allowed_files_schema.$id, {
|
|
@@ -70,14 +70,14 @@ describe(FileSelector, async () => {
|
|
|
70
70
|
handler: () => ({
|
|
71
71
|
extensions: ["1", "2", "3"],
|
|
72
72
|
}),
|
|
73
|
-
})
|
|
73
|
+
});
|
|
74
74
|
|
|
75
75
|
registerEndpoint(upload_file_schema.$id, {
|
|
76
76
|
method: upload_file_schema.methods[SECOND_INDEX],
|
|
77
77
|
handler: () => ({}),
|
|
78
|
-
})
|
|
78
|
+
});
|
|
79
79
|
|
|
80
|
-
const files = [new File(["fake_file"], "fake_file.txt")]
|
|
80
|
+
const files = [new File(["fake_file"], "fake_file.txt")];
|
|
81
81
|
test("auto_upload true", async () => {
|
|
82
82
|
const wrapper = await mountSuspended(FileSelector, {
|
|
83
83
|
global: {
|
|
@@ -88,19 +88,17 @@ describe(FileSelector, async () => {
|
|
|
88
88
|
files: files,
|
|
89
89
|
auto_upload: true,
|
|
90
90
|
},
|
|
91
|
-
})
|
|
91
|
+
});
|
|
92
92
|
|
|
93
|
-
await flushPromises()
|
|
94
|
-
expect(wrapper.componentVM.files).toEqual(files)
|
|
95
|
-
expect(wrapper.emitted()).toHaveProperty("update_values")
|
|
96
|
-
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH)
|
|
97
|
-
expect(wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX]).toEqual(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
)
|
|
103
|
-
})
|
|
93
|
+
await flushPromises();
|
|
94
|
+
expect(wrapper.componentVM.files).toEqual(files);
|
|
95
|
+
expect(wrapper.emitted()).toHaveProperty("update_values");
|
|
96
|
+
expect(wrapper.emitted().update_values).toHaveLength(EXPECTED_LENGTH);
|
|
97
|
+
expect(wrapper.emitted().update_values[FIRST_INDEX][FIRST_INDEX]).toEqual({
|
|
98
|
+
files,
|
|
99
|
+
auto_upload: false,
|
|
100
|
+
});
|
|
101
|
+
});
|
|
104
102
|
|
|
105
103
|
test("auto_upload false", async () => {
|
|
106
104
|
const wrapper = await mountSuspended(FileSelector, {
|
|
@@ -112,14 +110,14 @@ describe(FileSelector, async () => {
|
|
|
112
110
|
files: files,
|
|
113
111
|
auto_upload: false,
|
|
114
112
|
},
|
|
115
|
-
})
|
|
113
|
+
});
|
|
116
114
|
|
|
117
|
-
await flushPromises()
|
|
115
|
+
await flushPromises();
|
|
118
116
|
|
|
119
|
-
const file_uploader = wrapper.findComponent(FileUploader)
|
|
120
|
-
expect(wrapper.vm.files).toEqual(files)
|
|
121
|
-
const upload_files = vi.spyOn(file_uploader.vm, "upload_files")
|
|
122
|
-
expect(upload_files).not.toHaveBeenCalled()
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
})
|
|
117
|
+
const file_uploader = wrapper.findComponent(FileUploader);
|
|
118
|
+
expect(wrapper.vm.files).toEqual(files);
|
|
119
|
+
const upload_files = vi.spyOn(file_uploader.vm, "upload_files");
|
|
120
|
+
expect(upload_files).not.toHaveBeenCalled();
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
});
|
|
@@ -1,60 +1,58 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import * as components from "vuetify/components"
|
|
3
|
-
import { describe, expect, test } from "vitest"
|
|
4
|
-
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime"
|
|
5
|
-
import { flushPromises } from "@vue/test-utils"
|
|
6
|
-
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
2
|
+
import * as components from "vuetify/components";
|
|
3
|
+
import { describe, expect, test } from "vitest";
|
|
4
|
+
import { mountSuspended, registerEndpoint } from "@nuxt/test-utils/runtime";
|
|
5
|
+
import { flushPromises } from "@vue/test-utils";
|
|
6
|
+
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
7
7
|
|
|
8
8
|
// Local imports
|
|
9
|
-
import { setupActivePinia, vuetify } from "@ogw_tests/utils"
|
|
10
|
-
import FileUploader from "@ogw_front/components/FileUploader"
|
|
11
|
-
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
9
|
+
import { setupActivePinia, vuetify } from "@ogw_tests/utils";
|
|
10
|
+
import FileUploader from "@ogw_front/components/FileUploader";
|
|
11
|
+
import { useGeodeStore } from "@ogw_front/stores/geode";
|
|
12
12
|
|
|
13
|
-
const FIRST_INDEX = 0
|
|
14
|
-
const SECOND_INDEX = 1
|
|
13
|
+
const FIRST_INDEX = 0;
|
|
14
|
+
const SECOND_INDEX = 1;
|
|
15
15
|
|
|
16
|
-
const upload_file_schema = schemas.opengeodeweb_back.upload_file
|
|
16
|
+
const upload_file_schema = schemas.opengeodeweb_back.upload_file;
|
|
17
17
|
|
|
18
|
-
describe(FileUploader,
|
|
19
|
-
const pinia = setupActivePinia()
|
|
20
|
-
const geodeStore = useGeodeStore()
|
|
21
|
-
geodeStore.base_url = ""
|
|
18
|
+
describe(FileUploader, () => {
|
|
19
|
+
const pinia = setupActivePinia();
|
|
20
|
+
const geodeStore = useGeodeStore();
|
|
21
|
+
geodeStore.base_url = "";
|
|
22
22
|
|
|
23
23
|
registerEndpoint(upload_file_schema.$id, {
|
|
24
24
|
method: upload_file_schema.methods[FIRST_INDEX],
|
|
25
25
|
handler: () => ({}),
|
|
26
|
-
})
|
|
26
|
+
});
|
|
27
27
|
registerEndpoint(upload_file_schema.$id, {
|
|
28
28
|
method: upload_file_schema.methods[SECOND_INDEX],
|
|
29
29
|
handler: () => ({}),
|
|
30
|
-
})
|
|
30
|
+
});
|
|
31
31
|
|
|
32
|
-
const files = [new File(["fake_file"], "fake_file.txt")]
|
|
32
|
+
const files = [new File(["fake_file"], "fake_file.txt")];
|
|
33
33
|
|
|
34
|
-
describe(`Upload file`,
|
|
34
|
+
describe(`Upload file`, () => {
|
|
35
35
|
test(`prop auto_upload false`, async () => {
|
|
36
36
|
const wrapper = await mountSuspended(FileUploader, {
|
|
37
37
|
global: {
|
|
38
38
|
plugins: [vuetify, pinia],
|
|
39
39
|
},
|
|
40
40
|
props: { multiple: false, accept: "*.txt" },
|
|
41
|
-
})
|
|
41
|
+
});
|
|
42
42
|
|
|
43
|
-
const v_file_input = wrapper.find('input[type="file"]')
|
|
43
|
+
const v_file_input = wrapper.find('input[type="file"]');
|
|
44
44
|
Object.defineProperty(v_file_input.element, "files", {
|
|
45
45
|
value: files,
|
|
46
46
|
writable: true,
|
|
47
|
-
})
|
|
48
|
-
await v_file_input.trigger("change")
|
|
49
|
-
const v_btn = wrapper.findComponent(components.VBtn)
|
|
47
|
+
});
|
|
48
|
+
await v_file_input.trigger("change");
|
|
49
|
+
const v_btn = wrapper.findComponent(components.VBtn);
|
|
50
50
|
|
|
51
|
-
await v_btn.trigger("click")
|
|
52
|
-
await flushPromises()
|
|
53
|
-
await flushPromises()
|
|
54
|
-
expect(
|
|
55
|
-
|
|
56
|
-
).toEqual(files)
|
|
57
|
-
})
|
|
51
|
+
await v_btn.trigger("click");
|
|
52
|
+
await flushPromises();
|
|
53
|
+
await flushPromises();
|
|
54
|
+
expect(wrapper.emitted().files_uploaded[FIRST_INDEX][FIRST_INDEX]).toEqual(files);
|
|
55
|
+
});
|
|
58
56
|
|
|
59
57
|
test(`prop auto_upload true`, async () => {
|
|
60
58
|
const wrapper = await mountSuspended(FileUploader, {
|
|
@@ -62,11 +60,9 @@ describe(FileUploader, async () => {
|
|
|
62
60
|
plugins: [vuetify, pinia],
|
|
63
61
|
},
|
|
64
62
|
props: { multiple: false, accept: "*.txt", files, auto_upload: true },
|
|
65
|
-
})
|
|
66
|
-
await flushPromises()
|
|
67
|
-
expect(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
72
|
-
})
|
|
63
|
+
});
|
|
64
|
+
await flushPromises();
|
|
65
|
+
expect(wrapper.emitted().files_uploaded[FIRST_INDEX][FIRST_INDEX]).toEqual(files);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|