@geode/opengeodeweb-front 12.1.0 → 12.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.
Files changed (57) hide show
  1. package/.build/server/utils/microservices_process.js +1 -1
  2. package/.build/tests/browser/helpers/crs.js +136 -0
  3. package/.build/tests/browser/helpers/crs_flows.js +60 -0
  4. package/.build/tests/browser/helpers/crs_shortlist.js +13 -0
  5. package/.build/tests/browser/helpers/crs_test_data.js +40 -0
  6. package/.build/tests/browser/suites/crs.js +142 -0
  7. package/.build/tests/browser/suites/crs_harmonize.js +63 -0
  8. package/.build/tests/browser/suites/crs_shortlist.js +31 -0
  9. package/.build/tests/browser/suites/index.js +6 -0
  10. package/app/app.config.ts +4 -0
  11. package/app/components/CrsAlign.vue +207 -0
  12. package/app/components/CrsDialog.vue +400 -0
  13. package/app/components/CrsDialogHost.vue +66 -0
  14. package/app/components/CrsSelector.vue +100 -3
  15. package/app/components/PickButton.vue +43 -0
  16. package/app/components/ProjectCrsDialog.vue +109 -0
  17. package/app/components/ToolPanel.vue +5 -2
  18. package/app/components/Viewer/CrsOverlays.vue +29 -0
  19. package/app/components/Viewer/Ui.vue +3 -2
  20. package/app/composables/crs.ts +197 -0
  21. package/app/composables/crs_align.ts +206 -0
  22. package/app/composables/crs_assign.ts +102 -0
  23. package/app/composables/crs_link.ts +22 -0
  24. package/app/composables/crs_shortlist.ts +63 -0
  25. package/app/composables/project_crs.ts +197 -0
  26. package/app/composables/user_setting.ts +140 -0
  27. package/app/plugins/activity_connections.client.ts +9 -0
  28. package/app/stores/activity.ts +130 -0
  29. package/app/stores/back.ts +7 -2
  30. package/app/stores/basemap.ts +19 -2
  31. package/app/stores/cloud.ts +1 -1
  32. package/app/stores/crs.ts +11 -106
  33. package/app/stores/crs_helpers/geographic_list.ts +44 -0
  34. package/app/stores/crs_helpers/project_crs.ts +60 -0
  35. package/app/stores/crs_helpers/requests.ts +60 -0
  36. package/app/utils/activity_connections.ts +36 -0
  37. package/app/utils/activity_params.ts +40 -0
  38. package/app/utils/crs.ts +17 -1
  39. package/app/utils/import_item.ts +87 -0
  40. package/app/utils/import_workflow.ts +36 -94
  41. package/app/utils/log.ts +4 -1
  42. package/app/utils/reload_object.ts +26 -0
  43. package/internal/utils/api_fetch.ts +13 -2
  44. package/internal/utils/track_request.ts +74 -0
  45. package/internal/utils/upload_file.ts +73 -39
  46. package/internal/utils/viewer_call.ts +49 -39
  47. package/package.json +5 -5
  48. package/server/utils/microservices_process.ts +4 -1
  49. package/tests/browser/data/test_lambert93_no_crs.og_pts3d +0 -0
  50. package/tests/browser/data/test_utm31n.og_pts3d +0 -0
  51. package/tests/browser/helpers/crs.ts +250 -0
  52. package/tests/browser/helpers/crs_flows.ts +115 -0
  53. package/tests/browser/helpers/crs_shortlist.ts +27 -0
  54. package/tests/browser/helpers/crs_test_data.ts +34 -0
  55. package/tests/browser/suites/crs.ts +228 -0
  56. package/tests/browser/suites/crs_harmonize.ts +96 -0
  57. package/tests/browser/suites/crs_shortlist.ts +37 -0
@@ -4,6 +4,7 @@ import { reportError, reportTimeout } from "./error_feedback.js";
4
4
  import type { Microservice } from "./api_fetch.js";
5
5
  import type { RpcClient } from "@ogw_shared/utils/call_raw.js";
6
6
  import { callSchema } from "@ogw_shared/utils/call_schema";
7
+ import { trackRequest } from "./track_request.js";
7
8
  import { useFeedbackStore } from "@ogw_front/stores/feedback";
8
9
 
9
10
  interface ViewerMicroservice extends Microservice {
@@ -16,55 +17,64 @@ interface ViewerCallParams {
16
17
  timeout?: number;
17
18
  }
18
19
 
19
- async function viewer_call(
20
+ // Stops the request and reports its errors once, around the caller's own handlers
21
+ function viewerCallHandlers(
20
22
  microservice: ViewerMicroservice,
21
- { schema, params = {}, timeout }: ViewerCallParams,
23
+ schema: JsonRpcSchema,
24
+ requestStartingTime: Date,
22
25
  {
23
26
  request_error_function,
24
27
  response_function,
25
28
  response_error_function,
26
- }: RequestHandlersWithValidation = {},
29
+ }: RequestHandlersWithValidation,
30
+ ): RequestHandlersWithValidation {
31
+ return {
32
+ // CallRaw runs both error handlers on the same rejection: stop the request and report it once, in the response one.
33
+ async request_error_function(error: unknown): Promise<void> {
34
+ if (request_error_function) {
35
+ await request_error_function(error);
36
+ }
37
+ },
38
+ async response_function(data: unknown): Promise<void> {
39
+ endRequestLog(microservice, schema, requestStartingTime);
40
+ microservice.stop_request();
41
+ if (response_function) {
42
+ await response_function(data);
43
+ }
44
+ },
45
+ async response_error_function(response: unknown): Promise<void> {
46
+ microservice.stop_request();
47
+ reportError(schema.$id, response);
48
+ if (response_error_function) {
49
+ await response_error_function(response);
50
+ }
51
+ },
52
+ validation_error_function({ code, name, error }): void {
53
+ microservice.stop_request();
54
+ useFeedbackStore().add_error(code, schema.$id, name, error ?? "");
55
+ },
56
+ };
57
+ }
58
+
59
+ async function viewer_call(
60
+ microservice: ViewerMicroservice,
61
+ { schema, params = {}, timeout }: ViewerCallParams,
62
+ handlers: RequestHandlersWithValidation = {},
27
63
  ): Promise<unknown> {
28
- const feedbackStore = useFeedbackStore();
29
- const { client } = microservice;
30
64
  microservice.start_request();
31
65
 
32
66
  const requestStartingTime = startRequestLog(microservice, schema);
33
- const request = callSchema(
34
- {
35
- schema,
36
- params,
37
- client,
38
- timeout,
39
- },
40
- {
41
- // CallRaw runs both error handlers on the same rejection: stop the request and report it once, in the response one.
42
- async request_error_function(error: unknown) {
43
- if (request_error_function) {
44
- await request_error_function(error);
45
- }
46
- },
47
- async response_function(data: unknown) {
48
- endRequestLog(microservice, schema, requestStartingTime);
49
- microservice.stop_request();
50
- if (response_function) {
51
- await response_function(data);
52
- }
53
- },
54
- async response_error_function(response: unknown) {
55
- microservice.stop_request();
56
- reportError(schema.$id, response);
57
- if (response_error_function) {
58
- await response_error_function(response);
59
- }
60
- },
61
- validation_error_function({ code, name, error }) {
62
- microservice.stop_request();
63
- feedbackStore.add_error(code, schema.$id, name, error ?? "");
64
- },
65
- },
67
+ const followRequest = trackRequest({
68
+ source: microservice.$id,
69
+ kind: "ws",
70
+ route: schema.$id,
71
+ params,
72
+ });
73
+ const pending = callSchema(
74
+ { schema, params, client: microservice.client, timeout },
75
+ viewerCallHandlers(microservice, schema, requestStartingTime, handlers),
66
76
  );
67
- const result = await reportTimeout(schema.$id, request);
77
+ const result = await reportTimeout(schema.$id, followRequest(pending));
68
78
  return result;
69
79
  }
70
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "12.1.0",
3
+ "version": "12.2.0-rc.2",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {
@@ -82,10 +82,10 @@
82
82
  "prepublishOnly": "npm run build"
83
83
  },
84
84
  "dependencies": {
85
- "@geode/cloud-api": "latest",
86
- "@geode/opengeodeweb-back": "latest",
87
- "@geode/opengeodeweb-microservice": "latest",
88
- "@geode/opengeodeweb-viewer": "latest",
85
+ "@geode/cloud-api": "next",
86
+ "@geode/opengeodeweb-back": "next",
87
+ "@geode/opengeodeweb-microservice": "next",
88
+ "@geode/opengeodeweb-viewer": "next",
89
89
  "@kitware/vtk.js": "33.3.0",
90
90
  "@msgpack/msgpack": "2.8.0",
91
91
  "@phosphor-icons/web": "2.1.2",
@@ -55,8 +55,11 @@ async function runScript(
55
55
  }
56
56
  }
57
57
 
58
+ // Windows reports a taken port as WinError 10048 ("only one usage of each socket address")
58
59
  function isPortInUseError(error: unknown): boolean {
59
- return /EADDRINUSE|address already in use|port already in use/iu.test(String(error));
60
+ return /EADDRINUSE|address already in use|port already in use|only one usage of each socket address/iu.test(
61
+ String(error),
62
+ );
60
63
  }
61
64
 
62
65
  function resolveUploadFolderPath(
@@ -0,0 +1,250 @@
1
+ // Third party imports
2
+ import { type Locator, type Page, expect } from "@playwright/test";
3
+
4
+ // Local imports
5
+ import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "./app_interaction";
6
+ import { expandGeodeObjectTypeInTree, getTreeRowByTextAndParent } from "./object_trees/common";
7
+ import { getMainObjectTree } from "./object_trees/main_object_tree";
8
+ import { waitForActionSettled } from "./wait_for_action_settled";
9
+
10
+ const TOOLTIP_TIMEOUT_MS = 2000;
11
+ const TOOLTIP_HOVER_ATTEMPTS = 3;
12
+
13
+ async function getDataTreeRow(
14
+ window: Page,
15
+ geodeObjectType: string,
16
+ dataName: string,
17
+ ): Promise<Locator> {
18
+ const tree = getMainObjectTree(window);
19
+ await expandGeodeObjectTypeInTree(window, geodeObjectType, tree);
20
+ return getTreeRowByTextAndParent(window, geodeObjectType, dataName, tree);
21
+ }
22
+
23
+ // The tooltip opens on mouseenter: a hover landing while the tree re-renders misses it, so it is retried from
24
+ // Outside the row
25
+ async function hoverTreeRowTooltip(window: Page, row: Locator, target: Locator): Promise<void> {
26
+ // Each attempt waits for the previous hover: they must run one after another
27
+ // oxlint-disable no-await-in-loop
28
+ for (let attempt = 1; attempt <= TOOLTIP_HOVER_ATTEMPTS; attempt += 1) {
29
+ await moveMouseOutOfTheWay(window);
30
+ await row.getByTestId("treeItemLabel").first().hover();
31
+ const shown = await target
32
+ .waitFor({ state: "visible", timeout: TOOLTIP_TIMEOUT_MS })
33
+ .then(() => true)
34
+ .catch(() => false);
35
+ if (shown) {
36
+ return;
37
+ }
38
+ }
39
+ // oxlint-enable no-await-in-loop
40
+ throw new Error(`The tree tooltip did not open after ${TOOLTIP_HOVER_ATTEMPTS} hovers`);
41
+ }
42
+
43
+ async function openCrsFromTree(
44
+ window: Page,
45
+ geodeObjectType: string,
46
+ dataName: string,
47
+ ): Promise<void> {
48
+ const row = await getDataTreeRow(window, geodeObjectType, dataName);
49
+ const editButton = window.locator(".v-overlay--active").getByTestId("editCrsBtn");
50
+ await hoverTreeRowTooltip(window, row, editButton);
51
+ await editButton.click();
52
+ await waitForActionSettled(window);
53
+ }
54
+
55
+ // The tooltip of the tree row shows the crs of the data
56
+ async function expectTreeCrs(
57
+ window: Page,
58
+ geodeObjectType: string,
59
+ dataName: string,
60
+ expected: string,
61
+ ): Promise<void> {
62
+ const row = await getDataTreeRow(window, geodeObjectType, dataName);
63
+ const crsValue = window.locator(".v-overlay--active").getByTestId("tooltipCrsValue");
64
+ await hoverTreeRowTooltip(window, row, crsValue);
65
+ await expect(crsValue).toContainText(expected);
66
+ }
67
+
68
+ async function openCrsFromInfoCard(
69
+ window: Page,
70
+ geodeObjectType: string,
71
+ dataName: string,
72
+ ): Promise<void> {
73
+ const row = await getDataTreeRow(window, geodeObjectType, dataName);
74
+ await row.click({ button: "right" });
75
+ await waitForActionSettled(window);
76
+ await window.getByTestId("circularMenuCenterButton").click();
77
+ await window.getByTestId("infoEditCrsBtn").click();
78
+ await waitForActionSettled(window);
79
+ }
80
+
81
+ // The warning icon of the tree opens the crs dialog of the data
82
+ async function openCrsFromWarning(
83
+ window: Page,
84
+ geodeObjectType: string,
85
+ dataName: string,
86
+ ): Promise<void> {
87
+ const row = await getDataTreeRow(window, geodeObjectType, dataName);
88
+ await row.getByTestId("crsMismatchIcon").click();
89
+ await waitForActionSettled(window);
90
+ }
91
+
92
+ async function openCrsFromFeedback(window: Page, text: string): Promise<void> {
93
+ const snackbar = window.getByTestId("feedbackSnackbar").filter({ hasText: text });
94
+ await expect(snackbar).toBeVisible();
95
+ await snackbar.getByTestId("feedbackActionBtn").click();
96
+ await waitForActionSettled(window);
97
+ }
98
+
99
+ // Selecting is its own step so the dialog state is captured before the action
100
+ async function selectCrs(window: Page, crsName: string): Promise<void> {
101
+ await window.getByTestId("crsSearchInput").locator("input").fill(crsName);
102
+ // A click on the row selects it: the list has no checkbox column
103
+ await window.locator("tbody tr").filter({ hasText: crsName }).first().click();
104
+ await waitForActionSettled(window);
105
+ }
106
+
107
+ async function confirmAssign(window: Page): Promise<void> {
108
+ await window.getByTestId("crsAssignButton").click();
109
+ await waitForActionSettled(window);
110
+ // The global feedback snackbar outlives the next step: close it so screenshots stay stable
111
+ await closeFeedbackSnackbar(window);
112
+ }
113
+
114
+ async function expectCurrentCrs(window: Page, expected: string): Promise<void> {
115
+ await expect(window.getByTestId("crsCurrentValue")).toContainText(expected);
116
+ }
117
+
118
+ // A georeferenced data opens on convert
119
+ async function selectAssignMode(window: Page): Promise<void> {
120
+ await window.getByTestId("crsModeAssign").click();
121
+ await waitForActionSettled(window);
122
+ }
123
+
124
+ // Without closing the feedback: the step checks the dialog or the warning it shows
125
+ async function clickAssign(window: Page): Promise<void> {
126
+ await window.getByTestId("crsAssignButton").click();
127
+ await waitForActionSettled(window);
128
+ }
129
+
130
+ // The snackbar leaves after 10s: a slow basemap build (external tile servers) can outlast it while the action
131
+ // Settles, so it is watched from before the action
132
+ const FEEDBACK_TIMEOUT_MS = 60_000;
133
+
134
+ async function expectFeedback(
135
+ window: Page,
136
+ text: string,
137
+ action: () => Promise<void>,
138
+ ): Promise<void> {
139
+ const shown = window
140
+ .getByTestId("feedbackSnackbar")
141
+ .filter({ hasText: text })
142
+ // Several builds can fail with the same message (e.g. one per aligned data): any of them will do
143
+ .first()
144
+ .waitFor({ state: "visible", timeout: FEEDBACK_TIMEOUT_MS });
145
+ await Promise.all([shown, action()]);
146
+ await closeFeedbackSnackbar(window);
147
+ }
148
+
149
+ async function selectConvertMode(window: Page): Promise<void> {
150
+ await window.getByTestId("crsModeConvert").click();
151
+ await waitForActionSettled(window);
152
+ }
153
+
154
+ async function confirmConvert(window: Page): Promise<void> {
155
+ await window.getByTestId("crsConvertButton").click();
156
+ await waitForActionSettled(window);
157
+ await closeFeedbackSnackbar(window);
158
+ }
159
+
160
+ async function startAlignment(window: Page): Promise<void> {
161
+ await window.getByTestId("crsModeAlign").click();
162
+ await window.getByTestId("crsStartAlignButton").click();
163
+ await waitForActionSettled(window);
164
+ // The mouse left on the button would open its tooltip over the panel
165
+ await moveMouseOutOfTheWay(window);
166
+ }
167
+
168
+ async function fillAlignPoints(
169
+ window: Page,
170
+ prefix: "crsAlignSource" | "crsAlignTarget",
171
+ points: { x: number; y: number }[],
172
+ ): Promise<void> {
173
+ // Fills share the keyboard focus: they must run one after another
174
+ // oxlint-disable no-await-in-loop
175
+ for (const [index, { x, y }] of points.entries()) {
176
+ const inputs = window.getByTestId(`${prefix}-${index}`).locator("input");
177
+ await inputs.nth(0).fill(String(x));
178
+ await inputs.nth(1).fill(String(y));
179
+ }
180
+ // oxlint-enable no-await-in-loop
181
+ }
182
+
183
+ async function selectAlignmentCrs(window: Page, crsName: string): Promise<void> {
184
+ const panel = window.getByTestId("crsAlignPanel");
185
+ await panel.getByTestId("crsSearchInput").locator("input").fill(crsName);
186
+ await panel.locator("tbody tr").filter({ hasText: crsName }).first().click();
187
+ await waitForActionSettled(window);
188
+ }
189
+
190
+ // "All data" or "This data only", in the crs dialog (crsScope) or the align panel (crsAlignScope)
191
+ async function selectScope(
192
+ window: Page,
193
+ scope: "all" | "one",
194
+ testId: "crsScope" | "crsAlignScope" = "crsScope",
195
+ ): Promise<void> {
196
+ await window.getByTestId(`${testId}-${scope}`).locator("input").check();
197
+ await waitForActionSettled(window);
198
+ }
199
+
200
+ async function expectCrsMismatch(
201
+ window: Page,
202
+ geodeObjectType: string,
203
+ dataName: string,
204
+ expected: boolean,
205
+ ): Promise<void> {
206
+ const row = await getDataTreeRow(window, geodeObjectType, dataName);
207
+ // The icon only exists on a mismatched data
208
+ await expect(row.getByTestId("crsMismatchIcon")).toHaveCount(expected ? 1 : 0);
209
+ }
210
+
211
+ async function openProjectCrs(window: Page): Promise<void> {
212
+ await window.getByTestId("projectCrs").click();
213
+ await waitForActionSettled(window);
214
+ }
215
+
216
+ async function confirmProjectCrs(window: Page): Promise<void> {
217
+ await window.getByTestId("projectCrsApply").click();
218
+ await waitForActionSettled(window);
219
+ await closeFeedbackSnackbar(window);
220
+ }
221
+
222
+ async function applyAlignment(window: Page): Promise<void> {
223
+ await window.getByTestId("crsAlignApplyButton").click();
224
+ await waitForActionSettled(window);
225
+ await closeFeedbackSnackbar(window);
226
+ }
227
+
228
+ export {
229
+ applyAlignment,
230
+ clickAssign,
231
+ confirmAssign,
232
+ confirmConvert,
233
+ confirmProjectCrs,
234
+ expectCrsMismatch,
235
+ expectCurrentCrs,
236
+ expectFeedback,
237
+ expectTreeCrs,
238
+ fillAlignPoints,
239
+ openCrsFromFeedback,
240
+ openCrsFromInfoCard,
241
+ openCrsFromTree,
242
+ openCrsFromWarning,
243
+ openProjectCrs,
244
+ selectAlignmentCrs,
245
+ selectAssignMode,
246
+ selectConvertMode,
247
+ selectCrs,
248
+ selectScope,
249
+ startAlignment,
250
+ };
@@ -0,0 +1,115 @@
1
+ // Third party imports
2
+ import { type Page, expect } from "@playwright/test";
3
+
4
+ // Local imports
5
+ import { BREP_NAME, CURVE_NAME, POINTSET_NAME } from "./crs_test_data";
6
+ import {
7
+ applyAlignment,
8
+ clickAssign,
9
+ confirmConvert,
10
+ expectFeedback,
11
+ expectTreeCrs,
12
+ fillAlignPoints,
13
+ openCrsFromTree,
14
+ selectAlignmentCrs,
15
+ selectAssignMode,
16
+ selectConvertMode,
17
+ selectCrs,
18
+ selectScope,
19
+ } from "./crs";
20
+ import {
21
+ brepGeodeObjectType,
22
+ edgedCurveGeodeObjectType,
23
+ pointSetGeodeObjectType,
24
+ } from "./constants";
25
+ import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "./app_interaction";
26
+ import { getMainObjectTree } from "./object_trees/main_object_tree";
27
+ import { waitForActionSettled } from "./wait_for_action_settled";
28
+
29
+ async function closeCrsDialog(window: Page): Promise<void> {
30
+ await window.keyboard.press("Escape");
31
+ await moveMouseOutOfTheWay(window);
32
+ }
33
+
34
+ // The point set, the model and the curve of the crs suite
35
+ async function expectEveryRowCrs(window: Page, expected: string): Promise<void> {
36
+ await expectTreeCrs(window, pointSetGeodeObjectType, POINTSET_NAME, expected);
37
+ await expectTreeCrs(window, brepGeodeObjectType, BREP_NAME, expected);
38
+ await expectTreeCrs(window, edgedCurveGeodeObjectType, CURVE_NAME, expected);
39
+ }
40
+
41
+ async function fillAlignment(
42
+ window: Page,
43
+ source: { x: number; y: number }[],
44
+ target: { x: number; y: number }[],
45
+ crsName: string,
46
+ ): Promise<void> {
47
+ await fillAlignPoints(window, "crsAlignSource", source);
48
+ await fillAlignPoints(window, "crsAlignTarget", target);
49
+ await selectAlignmentCrs(window, crsName);
50
+ await moveMouseOutOfTheWay(window);
51
+ }
52
+
53
+ async function convertAloneTo(
54
+ window: Page,
55
+ geodeObjectType: string,
56
+ dataName: string,
57
+ crsName: string,
58
+ ): Promise<void> {
59
+ await openCrsFromTree(window, geodeObjectType, dataName);
60
+ await selectConvertMode(window);
61
+ await selectScope(window, "one");
62
+ await selectCrs(window, crsName);
63
+ await confirmConvert(window);
64
+ await moveMouseOutOfTheWay(window);
65
+ }
66
+
67
+ async function startMisfitAssign(
68
+ window: Page,
69
+ geodeObjectType: string,
70
+ dataName: string,
71
+ crsName: string,
72
+ ): Promise<void> {
73
+ await openCrsFromTree(window, geodeObjectType, dataName);
74
+ await selectAssignMode(window);
75
+ await selectCrs(window, crsName);
76
+ await clickAssign(window);
77
+ }
78
+
79
+ async function assignAnywayToAll(window: Page, crsName: string): Promise<void> {
80
+ await selectAssignMode(window);
81
+ await selectScope(window, "all");
82
+ await selectCrs(window, crsName);
83
+ await clickAssign(window);
84
+ await window.getByTestId("crsAssignAnyway").click();
85
+ await waitForActionSettled(window);
86
+ await closeFeedbackSnackbar(window);
87
+ await moveMouseOutOfTheWay(window);
88
+ }
89
+
90
+ // With a basemap (only in the apps that opt in), an alignment moving the data out of the domain of the project CRS
91
+ // Makes the basemap build fail: its message shows and the basemap is hidden. Without one, nothing else happens
92
+ async function applyAlignmentOffTheMap(window: Page): Promise<void> {
93
+ const basemapRow = getMainObjectTree(window)
94
+ .getByTestId("treeRowWrapper")
95
+ .filter({ hasText: "Basemap" });
96
+ if ((await basemapRow.count()) === 0) {
97
+ await applyAlignment(window);
98
+ return;
99
+ }
100
+ await expectFeedback(window, "Area outside the map projection limits", async () => {
101
+ await applyAlignment(window);
102
+ });
103
+ // Only the last build hides the basemap: no other message comes after
104
+ await expect(basemapRow.getByTestId("hiddenObjectEyeButton")).toBeVisible();
105
+ }
106
+
107
+ export {
108
+ applyAlignmentOffTheMap,
109
+ assignAnywayToAll,
110
+ closeCrsDialog,
111
+ convertAloneTo,
112
+ expectEveryRowCrs,
113
+ fillAlignment,
114
+ startMisfitAssign,
115
+ };
@@ -0,0 +1,27 @@
1
+ // Third party imports
2
+ import { type Page, expect } from "@playwright/test";
3
+
4
+ // Local imports
5
+ import { waitForActionSettled } from "./wait_for_action_settled";
6
+
7
+ // The star of a CRS row adds it to the favorites, kept as a chip above the search
8
+ async function toggleFavoriteCrs(window: Page, crsName: string): Promise<void> {
9
+ await window.getByTestId("crsSearchInput").locator("input").fill(crsName);
10
+ await window
11
+ .locator("tbody tr")
12
+ .filter({ hasText: crsName })
13
+ .first()
14
+ .getByTestId("crsFavoriteToggle")
15
+ .click();
16
+ await waitForActionSettled(window);
17
+ }
18
+
19
+ async function expectCrsChip(
20
+ window: Page,
21
+ kind: "crsFavoriteChip" | "crsRecentChip",
22
+ code: string,
23
+ ): Promise<void> {
24
+ await expect(window.getByTestId(kind).filter({ hasText: code })).toBeVisible();
25
+ }
26
+
27
+ export { expectCrsChip, toggleFavoriteCrs };
@@ -0,0 +1,34 @@
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 CURVE_NAME = "test";
8
+ const LAMBERT_93 = "RGF93 v1 / Lambert-93";
9
+ const UTM_31N = "WGS 84 / UTM zone 31N";
10
+ const CC42 = "RGF93 v1 / CC42";
11
+ const ALIGN_SOURCE = [
12
+ { x: 0, y: 0 },
13
+ { x: 1, y: 0 },
14
+ { x: 0, y: 1 },
15
+ ];
16
+ const ALIGN_TARGET = [
17
+ { x: 700_000, y: 6_600_000 },
18
+ { x: 700_010, y: 6_600_000 },
19
+ { x: 700_000, y: 6_600_010 },
20
+ ];
21
+
22
+ export {
23
+ ALIGN_SOURCE,
24
+ ALIGN_TARGET,
25
+ BREP_FILE,
26
+ BREP_NAME,
27
+ CC42,
28
+ CURVE_FILE,
29
+ CURVE_NAME,
30
+ LAMBERT_93,
31
+ POINTSET_FILE,
32
+ POINTSET_NAME,
33
+ UTM_31N,
34
+ };