vease 3.1.0 → 3.2.0-rc.2

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.
@@ -1,9 +1,6 @@
1
1
  import { getDataTableRow } from "./data_manager.js";
2
2
  import { waitForActionSettled } from "#ogw_e2e/wait_for_action_settled.js";
3
3
  import { expect } from "@playwright/test";
4
- import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "#ogw_e2e/app_interaction.js";
5
- import { expandGeodeObjectTypeInTree, getTreeRowByTextAndParent } from "#ogw_e2e/object_trees/common.js";
6
- import { getMainObjectTree } from "#ogw_e2e/object_trees/main_object_tree.js";
7
4
  //#region tests/e2e/utils/crs.ts
8
5
  async function expectDataRows(window, itemNames) {
9
6
  for (const itemName of itemNames) await expect(getDataTableRow(window, itemName)).toBeVisible();
@@ -15,119 +12,5 @@ async function openCrsByButton(window, itemName) {
15
12
  async function expectRowCrs(window, itemName, expected) {
16
13
  await expect(getDataTableRow(window, itemName).getByTestId("crsCell")).toContainText(expected);
17
14
  }
18
- async function getDataTreeRow(window, geodeObjectType, dataName) {
19
- const tree = getMainObjectTree(window);
20
- await expandGeodeObjectTypeInTree(window, geodeObjectType, tree);
21
- return getTreeRowByTextAndParent(window, geodeObjectType, dataName, tree);
22
- }
23
- const TOOLTIP_TIMEOUT_MS = 2e3;
24
- async function openCrsFromTree(window, geodeObjectType, dataName) {
25
- const row = await getDataTreeRow(window, geodeObjectType, dataName);
26
- const editButton = window.locator(".v-overlay--active").getByTestId("editCrsBtn");
27
- await expect(async () => {
28
- await moveMouseOutOfTheWay(window);
29
- await row.getByTestId("treeItemLabel").first().hover();
30
- await expect(editButton).toBeVisible({ timeout: TOOLTIP_TIMEOUT_MS });
31
- }).toPass();
32
- await editButton.click();
33
- await waitForActionSettled(window);
34
- }
35
- async function openCrsFromInfoCard(window, geodeObjectType, dataName) {
36
- await (await getDataTreeRow(window, geodeObjectType, dataName)).click({ button: "right" });
37
- await waitForActionSettled(window);
38
- await window.getByTestId("circularMenuCenterButton").click();
39
- await window.getByTestId("infoEditCrsBtn").click();
40
- await waitForActionSettled(window);
41
- }
42
- async function openCrsFromWarning(window, geodeObjectType, dataName) {
43
- await (await getDataTreeRow(window, geodeObjectType, dataName)).getByTestId("crsMismatchIcon").click();
44
- await waitForActionSettled(window);
45
- }
46
- async function openCrsFromFeedback(window, text) {
47
- const snackbar = window.getByTestId("feedbackSnackbar").filter({ hasText: text });
48
- await expect(snackbar).toBeVisible();
49
- await snackbar.getByTestId("feedbackActionBtn").click();
50
- await waitForActionSettled(window);
51
- }
52
- async function selectCrs(window, crsName) {
53
- await window.getByTestId("crsSearchInput").locator("input").fill(crsName);
54
- await window.locator("tbody tr").filter({ hasText: crsName }).first().click();
55
- await waitForActionSettled(window);
56
- }
57
- async function confirmAssign(window) {
58
- await window.getByTestId("crsAssignButton").click();
59
- await waitForActionSettled(window);
60
- await closeFeedbackSnackbar(window);
61
- }
62
- async function expectCurrentCrs(window, expected) {
63
- await expect(window.getByTestId("crsCurrentValue")).toContainText(expected);
64
- }
65
- async function selectAssignMode(window) {
66
- await window.getByTestId("crsModeAssign").click();
67
- await waitForActionSettled(window);
68
- }
69
- async function clickAssign(window) {
70
- await window.getByTestId("crsAssignButton").click();
71
- await waitForActionSettled(window);
72
- }
73
- const FEEDBACK_TIMEOUT_MS = 6e4;
74
- async function expectFeedback(window, text, action) {
75
- const shown = window.getByTestId("feedbackSnackbar").filter({ hasText: text }).first().waitFor({
76
- state: "visible",
77
- timeout: FEEDBACK_TIMEOUT_MS
78
- });
79
- await Promise.all([shown, action()]);
80
- await closeFeedbackSnackbar(window);
81
- }
82
- async function selectConvertMode(window) {
83
- await window.getByTestId("crsModeConvert").click();
84
- await waitForActionSettled(window);
85
- }
86
- async function confirmConvert(window) {
87
- await window.getByTestId("crsConvertButton").click();
88
- await waitForActionSettled(window);
89
- await closeFeedbackSnackbar(window);
90
- }
91
- async function startAlignment(window) {
92
- await window.getByTestId("crsModeAlign").click();
93
- await window.getByTestId("crsStartAlignButton").click();
94
- await waitForActionSettled(window);
95
- }
96
- async function fillAlignPoints(window, prefix, points) {
97
- for (const [index, { x, y }] of points.entries()) {
98
- const inputs = window.getByTestId(`${prefix}-${index}`).locator("input");
99
- await inputs.nth(0).fill(String(x));
100
- await inputs.nth(1).fill(String(y));
101
- }
102
- }
103
- async function selectAlignmentCrs(window, crsName) {
104
- const panel = window.getByTestId("crsAlignPanel");
105
- await panel.getByTestId("crsSearchInput").locator("input").fill(crsName);
106
- await panel.locator("tbody tr").filter({ hasText: crsName }).first().click();
107
- await waitForActionSettled(window);
108
- }
109
- async function selectScope(window, scope, testId = "crsScope") {
110
- await window.getByTestId(`${testId}-${scope}`).locator("input").check();
111
- await waitForActionSettled(window);
112
- }
113
- async function expectCrsMismatch(window, geodeObjectType, dataName, expected) {
114
- const icon = (await getDataTreeRow(window, geodeObjectType, dataName)).getByTestId("crsMismatchIcon");
115
- if (expected) await expect(icon).toBeVisible();
116
- else await expect(icon).toBeHidden();
117
- }
118
- async function openProjectCrs(window) {
119
- await window.getByTestId("projectCrs").click();
120
- await waitForActionSettled(window);
121
- }
122
- async function confirmProjectCrs(window) {
123
- await window.getByTestId("projectCrsApply").click();
124
- await waitForActionSettled(window);
125
- await closeFeedbackSnackbar(window);
126
- }
127
- async function applyAlignment(window) {
128
- await window.getByTestId("crsAlignApplyButton").click();
129
- await waitForActionSettled(window);
130
- await closeFeedbackSnackbar(window);
131
- }
132
15
  //#endregion
133
- export { applyAlignment, clickAssign, confirmAssign, confirmConvert, confirmProjectCrs, expectCrsMismatch, expectCurrentCrs, expectDataRows, expectFeedback, expectRowCrs, fillAlignPoints, openCrsByButton, openCrsFromFeedback, openCrsFromInfoCard, openCrsFromTree, openCrsFromWarning, openProjectCrs, selectAlignmentCrs, selectAssignMode, selectConvertMode, selectCrs, selectScope, startAlignment };
16
+ export { expectDataRows, expectRowCrs, openCrsByButton };
@@ -1,8 +1,8 @@
1
1
  import { navigateToExtensionsPage } from "./navigate.js";
2
- import { modalTransitionWait } from "#ogw_e2e/constants.js";
3
- import { consola } from "consola";
4
2
  import path from "node:path";
3
+ import { consola } from "consola";
5
4
  import { waitForLoadingScreen } from "#ogw_e2e/other.js";
5
+ import { modalTransitionWait } from "#ogw_e2e/constants.js";
6
6
  //#region tests/e2e/utils/extension.ts
7
7
  async function loadExtension(window, extensionFilePath) {
8
8
  await waitForLoadingScreen(window);
@@ -1,11 +1,16 @@
1
1
  import { navigateToApp } from "./navigate.js";
2
2
  import { expect } from "@playwright/test";
3
- import fs from "node:fs";
4
3
  import path from "node:path";
4
+ import fs from "node:fs";
5
5
  import os from "node:os";
6
6
  import { test as test$1 } from "#ogw_e2e/app_test.js";
7
7
  //#region tests/e2e/utils/fixtures.ts
8
8
  const BUSY_TIMEOUT_MS = 3e4;
9
+ async function closeWithoutSettings(electronApp, cleanup) {
10
+ const userDataPath = await electronApp?.evaluate(({ app }) => app.getPath("userData")).catch(() => void 0);
11
+ await cleanup();
12
+ if (userDataPath !== void 0) fs.rmSync(path.join(userDataPath, "settings.json"), { force: true });
13
+ }
9
14
  const test = test$1.extend({
10
15
  mode: ["DEFAULT", {
11
16
  option: true,
@@ -32,7 +37,7 @@ const test = test$1.extend({
32
37
  window,
33
38
  cleanup: async () => {
34
39
  desktopApp.electronApp = void 0;
35
- await cleanup();
40
+ await closeWithoutSettings(electronApp, cleanup);
36
41
  }
37
42
  };
38
43
  });
@@ -1,8 +1,8 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { waitForActionSettled } from "#ogw_e2e/wait_for_action_settled.js";
3
3
  import { expect } from "@playwright/test";
4
- import { consola } from "consola";
5
4
  import path from "node:path";
5
+ import { consola } from "consola";
6
6
  //#region tests/e2e/utils/load.ts
7
7
  const __dirname = import.meta.dirname;
8
8
  const loadWorkflowTimeout = 8e3;
@@ -1,6 +1,6 @@
1
+ import path from "node:path";
1
2
  import { consola } from "consola";
2
3
  import fs from "node:fs";
3
- import path from "node:path";
4
4
  import { findLatestBuild, parseElectronApp } from "electron-playwright-helpers";
5
5
  import { executableName } from "@geode/opengeodeweb-front/server/utils/path.js";
6
6
  import packageJson from "../../../../package.json" with { type: "json" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vease",
3
- "version": "3.1.0",
3
+ "version": "3.2.0-rc.2",
4
4
  "description": "Desktop and cloud software for data visualization",
5
5
  "keywords": [
6
6
  "Desktop",
@@ -92,13 +92,13 @@
92
92
  "@ai-sdk/mcp": "2.0.45",
93
93
  "@ai-sdk/openai-compatible": "3.0.44",
94
94
  "@ai-sdk/vue": "4.0.93",
95
- "@geode/cloud-api": "latest",
96
- "@geode/opengeodeweb-back": "latest",
97
- "@geode/opengeodeweb-front": "latest",
98
- "@geode/opengeodeweb-microservice": "latest",
99
- "@geode/opengeodeweb-viewer": "latest",
100
- "@geode/vease-back": "latest",
101
- "@geode/vease-viewer": "latest",
95
+ "@geode/cloud-api": "next",
96
+ "@geode/opengeodeweb-back": "next",
97
+ "@geode/opengeodeweb-front": "next",
98
+ "@geode/opengeodeweb-microservice": "next",
99
+ "@geode/opengeodeweb-viewer": "next",
100
+ "@geode/vease-back": "next",
101
+ "@geode/vease-viewer": "next",
102
102
  "@nuxtjs/mcp-toolkit": "0.18.1",
103
103
  "ai": "7.0.93",
104
104
  "bowser": "2.14.1",
@@ -1,16 +1,10 @@
1
1
  // Node imports
2
2
 
3
3
  // Third party imports
4
- import { type Locator, type Page, expect } from "@playwright/test";
4
+ import { type Page, expect } from "@playwright/test";
5
5
 
6
6
  // Local imports
7
- import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "#ogw_e2e/app_interaction.js";
8
- import {
9
- expandGeodeObjectTypeInTree,
10
- getTreeRowByTextAndParent,
11
- } from "#ogw_e2e/object_trees/common.js";
12
7
  import { getDataTableRow } from "./data_manager";
13
- import { getMainObjectTree } from "#ogw_e2e/object_trees/main_object_tree.js";
14
8
  import { waitForActionSettled } from "#ogw_e2e/wait_for_action_settled.js";
15
9
 
16
10
  async function expectDataRows(window: Page, itemNames: string[]): Promise<void> {
@@ -30,218 +24,4 @@ async function expectRowCrs(window: Page, itemName: string, expected: string): P
30
24
  await expect(getDataTableRow(window, itemName).getByTestId("crsCell")).toContainText(expected);
31
25
  }
32
26
 
33
- async function getDataTreeRow(
34
- window: Page,
35
- geodeObjectType: string,
36
- dataName: string,
37
- ): Promise<Locator> {
38
- const tree = getMainObjectTree(window);
39
- await expandGeodeObjectTypeInTree(window, geodeObjectType, tree);
40
- return getTreeRowByTextAndParent(window, geodeObjectType, dataName, tree);
41
- }
42
-
43
- const TOOLTIP_TIMEOUT_MS = 2000;
44
-
45
- async function openCrsFromTree(
46
- window: Page,
47
- geodeObjectType: string,
48
- dataName: string,
49
- ): Promise<void> {
50
- const row = await getDataTreeRow(window, geodeObjectType, dataName);
51
- const editButton = window.locator(".v-overlay--active").getByTestId("editCrsBtn");
52
- // The tooltip opens on mouseenter: a hover landing while the tree re-renders misses it, so it is retried from outside the row
53
- await expect(async () => {
54
- await moveMouseOutOfTheWay(window);
55
- await row.getByTestId("treeItemLabel").first().hover();
56
- await expect(editButton).toBeVisible({ timeout: TOOLTIP_TIMEOUT_MS });
57
- }).toPass();
58
- await editButton.click();
59
- await waitForActionSettled(window);
60
- }
61
-
62
- async function openCrsFromInfoCard(
63
- window: Page,
64
- geodeObjectType: string,
65
- dataName: string,
66
- ): Promise<void> {
67
- const row = await getDataTreeRow(window, geodeObjectType, dataName);
68
- await row.click({ button: "right" });
69
- await waitForActionSettled(window);
70
- await window.getByTestId("circularMenuCenterButton").click();
71
- await window.getByTestId("infoEditCrsBtn").click();
72
- await waitForActionSettled(window);
73
- }
74
-
75
- // The warning icon of the tree opens the crs dialog of the data
76
- async function openCrsFromWarning(
77
- window: Page,
78
- geodeObjectType: string,
79
- dataName: string,
80
- ): Promise<void> {
81
- const row = await getDataTreeRow(window, geodeObjectType, dataName);
82
- await row.getByTestId("crsMismatchIcon").click();
83
- await waitForActionSettled(window);
84
- }
85
-
86
- async function openCrsFromFeedback(window: Page, text: string): Promise<void> {
87
- const snackbar = window.getByTestId("feedbackSnackbar").filter({ hasText: text });
88
- await expect(snackbar).toBeVisible();
89
- await snackbar.getByTestId("feedbackActionBtn").click();
90
- await waitForActionSettled(window);
91
- }
92
-
93
- // Selecting is its own step so the dialog state is captured before the action
94
- async function selectCrs(window: Page, crsName: string): Promise<void> {
95
- await window.getByTestId("crsSearchInput").locator("input").fill(crsName);
96
- // A click on the row selects it: the list has no checkbox column
97
- await window.locator("tbody tr").filter({ hasText: crsName }).first().click();
98
- await waitForActionSettled(window);
99
- }
100
-
101
- async function confirmAssign(window: Page): Promise<void> {
102
- await window.getByTestId("crsAssignButton").click();
103
- await waitForActionSettled(window);
104
- // The global feedback snackbar outlives the next step: close it so screenshots stay stable
105
- await closeFeedbackSnackbar(window);
106
- }
107
-
108
- async function expectCurrentCrs(window: Page, expected: string): Promise<void> {
109
- await expect(window.getByTestId("crsCurrentValue")).toContainText(expected);
110
- }
111
-
112
- // A georeferenced data opens on convert
113
- async function selectAssignMode(window: Page): Promise<void> {
114
- await window.getByTestId("crsModeAssign").click();
115
- await waitForActionSettled(window);
116
- }
117
-
118
- // Without closing the feedback: the step checks the dialog or the warning it shows
119
- async function clickAssign(window: Page): Promise<void> {
120
- await window.getByTestId("crsAssignButton").click();
121
- await waitForActionSettled(window);
122
- }
123
-
124
- // The snackbar leaves after 10s: a slow basemap build (external tile servers) can outlast it while the action settles, so it is watched from before the action
125
- const FEEDBACK_TIMEOUT_MS = 60_000;
126
-
127
- async function expectFeedback(
128
- window: Page,
129
- text: string,
130
- action: () => Promise<void>,
131
- ): Promise<void> {
132
- const shown = window
133
- .getByTestId("feedbackSnackbar")
134
- .filter({ hasText: text })
135
- // Several builds can fail with the same message (e.g. one per aligned data): any of them will do
136
- .first()
137
- .waitFor({ state: "visible", timeout: FEEDBACK_TIMEOUT_MS });
138
- await Promise.all([shown, action()]);
139
- await closeFeedbackSnackbar(window);
140
- }
141
-
142
- async function selectConvertMode(window: Page): Promise<void> {
143
- await window.getByTestId("crsModeConvert").click();
144
- await waitForActionSettled(window);
145
- }
146
-
147
- async function confirmConvert(window: Page): Promise<void> {
148
- await window.getByTestId("crsConvertButton").click();
149
- await waitForActionSettled(window);
150
- await closeFeedbackSnackbar(window);
151
- }
152
-
153
- async function startAlignment(window: Page): Promise<void> {
154
- await window.getByTestId("crsModeAlign").click();
155
- await window.getByTestId("crsStartAlignButton").click();
156
- await waitForActionSettled(window);
157
- }
158
-
159
- async function fillAlignPoints(
160
- window: Page,
161
- prefix: "crsAlignSource" | "crsAlignTarget",
162
- points: { x: number; y: number }[],
163
- ): Promise<void> {
164
- // Fills share the keyboard focus: they must run one after another
165
- // oxlint-disable no-await-in-loop
166
- for (const [index, { x, y }] of points.entries()) {
167
- const inputs = window.getByTestId(`${prefix}-${index}`).locator("input");
168
- await inputs.nth(0).fill(String(x));
169
- await inputs.nth(1).fill(String(y));
170
- }
171
- // oxlint-enable no-await-in-loop
172
- }
173
-
174
- async function selectAlignmentCrs(window: Page, crsName: string): Promise<void> {
175
- const panel = window.getByTestId("crsAlignPanel");
176
- await panel.getByTestId("crsSearchInput").locator("input").fill(crsName);
177
- await panel.locator("tbody tr").filter({ hasText: crsName }).first().click();
178
- await waitForActionSettled(window);
179
- }
180
-
181
- // "All data" or "This data only", in the crs dialog (crsScope) or the georeference drawer (crsAlignScope)
182
- async function selectScope(
183
- window: Page,
184
- scope: "all" | "one",
185
- testId: "crsScope" | "crsAlignScope" = "crsScope",
186
- ): Promise<void> {
187
- await window.getByTestId(`${testId}-${scope}`).locator("input").check();
188
- await waitForActionSettled(window);
189
- }
190
-
191
- async function expectCrsMismatch(
192
- window: Page,
193
- geodeObjectType: string,
194
- dataName: string,
195
- expected: boolean,
196
- ): Promise<void> {
197
- const row = await getDataTreeRow(window, geodeObjectType, dataName);
198
- const icon = row.getByTestId("crsMismatchIcon");
199
- if (expected) {
200
- await expect(icon).toBeVisible();
201
- } else {
202
- await expect(icon).toBeHidden();
203
- }
204
- }
205
-
206
- async function openProjectCrs(window: Page): Promise<void> {
207
- await window.getByTestId("projectCrs").click();
208
- await waitForActionSettled(window);
209
- }
210
-
211
- async function confirmProjectCrs(window: Page): Promise<void> {
212
- await window.getByTestId("projectCrsApply").click();
213
- await waitForActionSettled(window);
214
- await closeFeedbackSnackbar(window);
215
- }
216
-
217
- async function applyAlignment(window: Page): Promise<void> {
218
- await window.getByTestId("crsAlignApplyButton").click();
219
- await waitForActionSettled(window);
220
- await closeFeedbackSnackbar(window);
221
- }
222
-
223
- export {
224
- applyAlignment,
225
- clickAssign,
226
- confirmAssign,
227
- confirmConvert,
228
- confirmProjectCrs,
229
- expectCrsMismatch,
230
- expectCurrentCrs,
231
- expectDataRows,
232
- expectFeedback,
233
- expectRowCrs,
234
- fillAlignPoints,
235
- openCrsByButton,
236
- openCrsFromFeedback,
237
- openCrsFromInfoCard,
238
- openCrsFromTree,
239
- openCrsFromWarning,
240
- openProjectCrs,
241
- selectAlignmentCrs,
242
- selectConvertMode,
243
- selectCrs,
244
- selectScope,
245
- selectAssignMode,
246
- startAlignment,
247
- };
27
+ export { expectDataRows, expectRowCrs, openCrsByButton };
@@ -34,6 +34,23 @@ interface TestFixtures {
34
34
  electronApp: ElectronApplication | undefined;
35
35
  }
36
36
 
37
+ // Each suite starts from the default settings, as a fresh browser context does: the desktop app keeps them in the
38
+ // Settings.json of its userData folder, which the next suites of the worker would read. Asked to the app, since
39
+ // Windows may not resolve it from APPDATA
40
+ async function closeWithoutSettings(
41
+ electronApp: ElectronApplication | undefined,
42
+ cleanup: () => Promise<void>,
43
+ ): Promise<void> {
44
+ // A crashed app cannot answer: it is still closed
45
+ const userDataPath = await electronApp
46
+ ?.evaluate(({ app }) => app.getPath("userData"))
47
+ .catch(() => undefined);
48
+ await cleanup();
49
+ if (userDataPath !== undefined) {
50
+ fs.rmSync(path.join(userDataPath, "settings.json"), { force: true });
51
+ }
52
+ }
53
+
37
54
  const test = appTest.extend<TestFixtures, WorkerFixtures>({
38
55
  mode: ["DEFAULT", { option: true, scope: "worker" }],
39
56
 
@@ -73,7 +90,7 @@ const test = appTest.extend<TestFixtures, WorkerFixtures>({
73
90
  window,
74
91
  cleanup: async (): Promise<void> => {
75
92
  desktopApp.electronApp = undefined;
76
- await cleanup();
93
+ await closeWithoutSettings(electronApp, cleanup);
77
94
  },
78
95
  };
79
96
  });
@@ -1,47 +0,0 @@
1
- import { clickAssign, confirmConvert, expectRowCrs, fillAlignPoints, openCrsByButton, selectAlignmentCrs, selectAssignMode, selectConvertMode, selectCrs, selectScope } from "./crs.js";
2
- import { navigateToDataManagerPage } from "./navigate.js";
3
- import { waitForActionSettled } from "#ogw_e2e/wait_for_action_settled.js";
4
- import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "#ogw_e2e/app_interaction.js";
5
- import { brepGeodeObjectType, edgedCurveGeodeObjectType, pointSetGeodeObjectType } from "#ogw_e2e/constants.js";
6
- //#region tests/e2e/utils/crs_flows.ts
7
- async function closeCrsDialog(window) {
8
- await window.keyboard.press("Escape");
9
- await moveMouseOutOfTheWay(window);
10
- }
11
- async function expectEveryRowCrs(window, expected) {
12
- await expectRowCrs(window, pointSetGeodeObjectType, expected);
13
- await expectRowCrs(window, brepGeodeObjectType, expected);
14
- await expectRowCrs(window, edgedCurveGeodeObjectType, expected);
15
- }
16
- async function fillAlignment(window, source, target, crsName) {
17
- await fillAlignPoints(window, "crsAlignSource", source);
18
- await fillAlignPoints(window, "crsAlignTarget", target);
19
- await selectAlignmentCrs(window, crsName);
20
- }
21
- async function convertAloneTo(window, geodeObjectType, crsName) {
22
- await navigateToDataManagerPage(window);
23
- await openCrsByButton(window, geodeObjectType);
24
- await selectConvertMode(window);
25
- await selectScope(window, "one");
26
- await selectCrs(window, crsName);
27
- await confirmConvert(window);
28
- await moveMouseOutOfTheWay(window);
29
- }
30
- async function startMisfitAssign(window, geodeObjectType, crsName) {
31
- await openCrsByButton(window, geodeObjectType);
32
- await selectAssignMode(window);
33
- await selectCrs(window, crsName);
34
- await clickAssign(window);
35
- }
36
- async function assignAnywayToAll(window, crsName) {
37
- await selectAssignMode(window);
38
- await selectScope(window, "all");
39
- await selectCrs(window, crsName);
40
- await clickAssign(window);
41
- await window.getByTestId("crsAssignAnyway").click();
42
- await waitForActionSettled(window);
43
- await closeFeedbackSnackbar(window);
44
- await moveMouseOutOfTheWay(window);
45
- }
46
- //#endregion
47
- export { assignAnywayToAll, closeCrsDialog, convertAloneTo, expectEveryRowCrs, fillAlignment, startMisfitAssign };
@@ -1,39 +0,0 @@
1
- //#region tests/e2e/utils/crs_test_data.ts
2
- const BREP_FILE = "test.og_brep";
3
- const POINTSET_FILE = "test.og_pts3d";
4
- const CURVE_FILE = "test.og_edc3d";
5
- const POINTSET_NAME = "test";
6
- const BREP_NAME = "test";
7
- const LAMBERT_93 = "RGF93 v1 / Lambert-93";
8
- const UTM_31N = "WGS 84 / UTM zone 31N";
9
- const CC42 = "RGF93 v1 / CC42";
10
- const ALIGN_SOURCE = [
11
- {
12
- x: 0,
13
- y: 0
14
- },
15
- {
16
- x: 1,
17
- y: 0
18
- },
19
- {
20
- x: 0,
21
- y: 1
22
- }
23
- ];
24
- const ALIGN_TARGET = [
25
- {
26
- x: 7e5,
27
- y: 66e5
28
- },
29
- {
30
- x: 700010,
31
- y: 66e5
32
- },
33
- {
34
- x: 7e5,
35
- y: 6600010
36
- }
37
- ];
38
- //#endregion
39
- export { ALIGN_SOURCE, ALIGN_TARGET, BREP_FILE, BREP_NAME, CC42, CURVE_FILE, LAMBERT_93, POINTSET_FILE, POINTSET_NAME, UTM_31N };
@@ -1,91 +0,0 @@
1
- // Third party imports
2
- import type { Page } from "@playwright/test";
3
-
4
- // Local imports
5
- import {
6
- brepGeodeObjectType,
7
- edgedCurveGeodeObjectType,
8
- pointSetGeodeObjectType,
9
- } from "#ogw_e2e/constants.js";
10
- import {
11
- clickAssign,
12
- confirmConvert,
13
- expectRowCrs,
14
- fillAlignPoints,
15
- openCrsByButton,
16
- selectAlignmentCrs,
17
- selectAssignMode,
18
- selectConvertMode,
19
- selectCrs,
20
- selectScope,
21
- } from "./crs";
22
- import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "#ogw_e2e/app_interaction.js";
23
- import { navigateToDataManagerPage } from "./navigate";
24
- import { waitForActionSettled } from "#ogw_e2e/wait_for_action_settled.js";
25
-
26
- async function closeCrsDialog(window: Page): Promise<void> {
27
- await window.keyboard.press("Escape");
28
- await moveMouseOutOfTheWay(window);
29
- }
30
-
31
- async function expectEveryRowCrs(window: Page, expected: string): Promise<void> {
32
- await expectRowCrs(window, pointSetGeodeObjectType, expected);
33
- await expectRowCrs(window, brepGeodeObjectType, expected);
34
- await expectRowCrs(window, edgedCurveGeodeObjectType, expected);
35
- }
36
-
37
- async function fillAlignment(
38
- window: Page,
39
- source: { x: number; y: number }[],
40
- target: { x: number; y: number }[],
41
- crsName: string,
42
- ): Promise<void> {
43
- await fillAlignPoints(window, "crsAlignSource", source);
44
- await fillAlignPoints(window, "crsAlignTarget", target);
45
- await selectAlignmentCrs(window, crsName);
46
- }
47
-
48
- async function convertAloneTo(
49
- window: Page,
50
- geodeObjectType: string,
51
- crsName: string,
52
- ): Promise<void> {
53
- await navigateToDataManagerPage(window);
54
- await openCrsByButton(window, geodeObjectType);
55
- await selectConvertMode(window);
56
- await selectScope(window, "one");
57
- await selectCrs(window, crsName);
58
- await confirmConvert(window);
59
- await moveMouseOutOfTheWay(window);
60
- }
61
-
62
- async function startMisfitAssign(
63
- window: Page,
64
- geodeObjectType: string,
65
- crsName: string,
66
- ): Promise<void> {
67
- await openCrsByButton(window, geodeObjectType);
68
- await selectAssignMode(window);
69
- await selectCrs(window, crsName);
70
- await clickAssign(window);
71
- }
72
-
73
- async function assignAnywayToAll(window: Page, crsName: string): Promise<void> {
74
- await selectAssignMode(window);
75
- await selectScope(window, "all");
76
- await selectCrs(window, crsName);
77
- await clickAssign(window);
78
- await window.getByTestId("crsAssignAnyway").click();
79
- await waitForActionSettled(window);
80
- await closeFeedbackSnackbar(window);
81
- await moveMouseOutOfTheWay(window);
82
- }
83
-
84
- export {
85
- assignAnywayToAll,
86
- closeCrsDialog,
87
- convertAloneTo,
88
- expectEveryRowCrs,
89
- fillAlignment,
90
- startMisfitAssign,
91
- };
@@ -1,32 +0,0 @@
1
- const BREP_FILE = "test.og_brep";
2
- const POINTSET_FILE = "test.og_pts3d";
3
- // Wells-like data sharing the local frame of the model: aligned with it
4
- const CURVE_FILE = "test.og_edc3d";
5
- const POINTSET_NAME = "test";
6
- const BREP_NAME = "test";
7
- const LAMBERT_93 = "RGF93 v1 / Lambert-93";
8
- const UTM_31N = "WGS 84 / UTM zone 31N";
9
- const CC42 = "RGF93 v1 / CC42";
10
- const ALIGN_SOURCE = [
11
- { x: 0, y: 0 },
12
- { x: 1, y: 0 },
13
- { x: 0, y: 1 },
14
- ];
15
- const ALIGN_TARGET = [
16
- { x: 700_000, y: 6_600_000 },
17
- { x: 700_010, y: 6_600_000 },
18
- { x: 700_000, y: 6_600_010 },
19
- ];
20
-
21
- export {
22
- ALIGN_SOURCE,
23
- ALIGN_TARGET,
24
- BREP_FILE,
25
- BREP_NAME,
26
- CC42,
27
- CURVE_FILE,
28
- LAMBERT_93,
29
- POINTSET_FILE,
30
- POINTSET_NAME,
31
- UTM_31N,
32
- };