vease 3.1.0-rc.2 → 3.1.0-rc.4

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,8 +1,8 @@
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";
4
5
  import { expandGeodeObjectTypeInTree, getTreeRowByTextAndParent } from "#ogw_e2e/object_trees/common.js";
5
- import { closeFeedbackSnackbar } from "#ogw_e2e/app_interaction.js";
6
6
  import { getMainObjectTree } from "#ogw_e2e/object_trees/main_object_tree.js";
7
7
  //#region tests/e2e/utils/crs.ts
8
8
  async function expectDataRows(window, itemNames) {
@@ -20,11 +20,15 @@ async function getDataTreeRow(window, geodeObjectType, dataName) {
20
20
  await expandGeodeObjectTypeInTree(window, geodeObjectType, tree);
21
21
  return getTreeRowByTextAndParent(window, geodeObjectType, dataName, tree);
22
22
  }
23
+ const TOOLTIP_TIMEOUT_MS = 2e3;
23
24
  async function openCrsFromTree(window, geodeObjectType, dataName) {
24
- await (await getDataTreeRow(window, geodeObjectType, dataName)).getByTestId("treeItemLabel").first().hover();
25
- await waitForActionSettled(window);
25
+ const row = await getDataTreeRow(window, geodeObjectType, dataName);
26
26
  const editButton = window.locator(".v-overlay--active").getByTestId("editCrsBtn");
27
- await editButton.hover();
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();
28
32
  await editButton.click();
29
33
  await waitForActionSettled(window);
30
34
  }
@@ -47,7 +51,7 @@ async function openCrsFromFeedback(window, text) {
47
51
  }
48
52
  async function selectCrs(window, crsName) {
49
53
  await window.getByTestId("crsSearchInput").locator("input").fill(crsName);
50
- await window.locator("tr").filter({ hasText: crsName }).locator("input").first().check();
54
+ await window.locator("tbody tr").filter({ hasText: crsName }).first().click();
51
55
  await waitForActionSettled(window);
52
56
  }
53
57
  async function confirmAssign(window) {
@@ -68,7 +72,7 @@ async function clickAssign(window) {
68
72
  }
69
73
  const FEEDBACK_TIMEOUT_MS = 6e4;
70
74
  async function expectFeedback(window, text, action) {
71
- const shown = window.getByTestId("feedbackSnackbar").filter({ hasText: text }).waitFor({
75
+ const shown = window.getByTestId("feedbackSnackbar").filter({ hasText: text }).first().waitFor({
72
76
  state: "visible",
73
77
  timeout: FEEDBACK_TIMEOUT_MS
74
78
  });
@@ -99,7 +103,7 @@ async function fillAlignPoints(window, prefix, points) {
99
103
  async function selectAlignmentCrs(window, crsName) {
100
104
  const panel = window.getByTestId("crsAlignPanel");
101
105
  await panel.getByTestId("crsSearchInput").locator("input").fill(crsName);
102
- await panel.locator("tr").filter({ hasText: crsName }).locator("input").first().check();
106
+ await panel.locator("tbody tr").filter({ hasText: crsName }).first().click();
103
107
  await waitForActionSettled(window);
104
108
  }
105
109
  async function selectScope(window, scope, testId = "crsScope") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vease",
3
- "version": "3.1.0-rc.2",
3
+ "version": "3.1.0-rc.4",
4
4
  "description": "Desktop and cloud software for data visualization",
5
5
  "keywords": [
6
6
  "Desktop",
@@ -4,11 +4,11 @@
4
4
  import { type Locator, type Page, expect } from "@playwright/test";
5
5
 
6
6
  // Local imports
7
+ import { closeFeedbackSnackbar, moveMouseOutOfTheWay } from "#ogw_e2e/app_interaction.js";
7
8
  import {
8
9
  expandGeodeObjectTypeInTree,
9
10
  getTreeRowByTextAndParent,
10
11
  } from "#ogw_e2e/object_trees/common.js";
11
- import { closeFeedbackSnackbar } from "#ogw_e2e/app_interaction.js";
12
12
  import { getDataTableRow } from "./data_manager";
13
13
  import { getMainObjectTree } from "#ogw_e2e/object_trees/main_object_tree.js";
14
14
  import { waitForActionSettled } from "#ogw_e2e/wait_for_action_settled.js";
@@ -40,16 +40,21 @@ async function getDataTreeRow(
40
40
  return getTreeRowByTextAndParent(window, geodeObjectType, dataName, tree);
41
41
  }
42
42
 
43
+ const TOOLTIP_TIMEOUT_MS = 2000;
44
+
43
45
  async function openCrsFromTree(
44
46
  window: Page,
45
47
  geodeObjectType: string,
46
48
  dataName: string,
47
49
  ): Promise<void> {
48
50
  const row = await getDataTreeRow(window, geodeObjectType, dataName);
49
- await row.getByTestId("treeItemLabel").first().hover();
50
- await waitForActionSettled(window);
51
51
  const editButton = window.locator(".v-overlay--active").getByTestId("editCrsBtn");
52
- await editButton.hover();
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();
53
58
  await editButton.click();
54
59
  await waitForActionSettled(window);
55
60
  }
@@ -88,7 +93,8 @@ async function openCrsFromFeedback(window: Page, text: string): Promise<void> {
88
93
  // Selecting is its own step so the dialog state is captured before the action
89
94
  async function selectCrs(window: Page, crsName: string): Promise<void> {
90
95
  await window.getByTestId("crsSearchInput").locator("input").fill(crsName);
91
- await window.locator("tr").filter({ hasText: crsName }).locator("input").first().check();
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();
92
98
  await waitForActionSettled(window);
93
99
  }
94
100
 
@@ -126,6 +132,8 @@ async function expectFeedback(
126
132
  const shown = window
127
133
  .getByTestId("feedbackSnackbar")
128
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()
129
137
  .waitFor({ state: "visible", timeout: FEEDBACK_TIMEOUT_MS });
130
138
  await Promise.all([shown, action()]);
131
139
  await closeFeedbackSnackbar(window);
@@ -166,7 +174,7 @@ async function fillAlignPoints(
166
174
  async function selectAlignmentCrs(window: Page, crsName: string): Promise<void> {
167
175
  const panel = window.getByTestId("crsAlignPanel");
168
176
  await panel.getByTestId("crsSearchInput").locator("input").fill(crsName);
169
- await panel.locator("tr").filter({ hasText: crsName }).locator("input").first().check();
177
+ await panel.locator("tbody tr").filter({ hasText: crsName }).first().click();
170
178
  await waitForActionSettled(window);
171
179
  }
172
180
 
@@ -50,7 +50,7 @@ async function navigateToApp(
50
50
  return {
51
51
  window: firstWindow,
52
52
  electronApp,
53
- cleanup: async () => {
53
+ cleanup: async (): Promise<void> => {
54
54
  await electronApp.close();
55
55
  },
56
56
  };
@@ -78,7 +78,7 @@ async function navigateToApp(
78
78
 
79
79
  return {
80
80
  window: page,
81
- cleanup: async () => {
81
+ cleanup: async (): Promise<void> => {
82
82
  await page.close();
83
83
  await browser.close();
84
84
  await kill(nuxtPort);
@@ -93,7 +93,7 @@ async function openCloudApp(
93
93
 
94
94
  return {
95
95
  window: page,
96
- cleanup: async () => {
96
+ cleanup: async (): Promise<void> => {
97
97
  await page.close();
98
98
  await browser.close();
99
99
  },