vease 1.59.2-rc.1 → 1.59.2-rc.3

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.
@@ -8,12 +8,16 @@ async function closeAllMenus(window) {
8
8
  await window.keyboard.press("Escape");
9
9
  await waitForActionSettled(window);
10
10
  }
11
+ const CLOSE_SNACKBAR_TIMEOUT_MS = 2e3;
11
12
  async function closeFeedbackSnackbar(window) {
12
13
  const snackbars = window.getByTestId("feedbackSnackbar");
13
14
  while (await snackbars.count() > 0) {
14
15
  const count = await snackbars.count();
15
- await snackbars.first().getByTestId("feedbackCloseBtn").click();
16
- await expect(snackbars).toHaveCount(count - 1);
16
+ await snackbars.first().getByTestId("feedbackCloseBtn").click({
17
+ force: true,
18
+ timeout: CLOSE_SNACKBAR_TIMEOUT_MS
19
+ }).catch(() => void 0);
20
+ await expect(snackbars).not.toHaveCount(count);
17
21
  }
18
22
  }
19
23
  //#endregion
@@ -22,16 +22,16 @@ async function resetShrinkFilter(window) {
22
22
  await waitForActionSettled(window);
23
23
  }
24
24
  async function toggleShrinkTargetAllVisible(window) {
25
- await window.getByTestId("shrinkTargetAllVisibleSwitch").getByRole("checkbox").click();
25
+ await window.getByTestId("shrinkTargetAllVisibleSwitch").getByRole("checkbox").click({ force: true });
26
26
  await waitForActionSettled(window);
27
27
  }
28
28
  async function selectShrinkDatasets(window, datasetName, index = 0) {
29
29
  const select = window.getByTestId("shrinkSelectedDatasetsSelect");
30
- await select.click();
30
+ await select.click({ force: true });
31
31
  await waitForActionSettled(window);
32
- await window.getByRole("option", { name: datasetName }).nth(index).click();
32
+ await window.getByTestId("shrinkSelectedDatasetsOption").filter({ hasText: datasetName }).nth(index).click({ force: true });
33
33
  await waitForActionSettled(window);
34
- await select.click();
34
+ await select.click({ force: true });
35
35
  await waitForActionSettled(window);
36
36
  }
37
37
  async function toggleExplodeFilter(window) {
@@ -46,15 +46,16 @@ async function resetClippingPlanes(window) {
46
46
  await waitForActionSettled(window);
47
47
  }
48
48
  async function toggleTargetAllVisible(window) {
49
- await window.getByTestId("targetAllVisibleSwitch").getByRole("checkbox").click();
49
+ await window.getByTestId("targetAllVisibleSwitch").getByRole("checkbox").click({ force: true });
50
50
  await waitForActionSettled(window);
51
51
  }
52
52
  async function selectClippingDatasets(window, datasetName, index = 0) {
53
- await window.getByTestId("selectedDatasetsSelect").click();
53
+ const select = window.getByTestId("selectedDatasetsSelect");
54
+ await select.click({ force: true });
54
55
  await waitForActionSettled(window);
55
- await window.getByRole("option", { name: datasetName }).nth(index).click();
56
+ await window.getByTestId("selectedDatasetsOption").filter({ hasText: datasetName }).nth(index).click({ force: true });
56
57
  await waitForActionSettled(window);
57
- await window.getByTestId("selectedDatasetsSelect").click();
58
+ await select.click({ force: true });
58
59
  await waitForActionSettled(window);
59
60
  }
60
61
  async function toggleSlice(window) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vease",
3
- "version": "1.59.2-rc.1",
3
+ "version": "1.59.2-rc.3",
4
4
  "description": "Desktop and cloud software for data visualization",
5
5
  "keywords": [
6
6
  "Desktop",
@@ -80,7 +80,7 @@
80
80
  "test:e2e:browser": "npm run test:e2e:browser:chrome --",
81
81
  "test:e2e:cloud": "npm run test:e2e -- --project=cloud",
82
82
  "test:e2e:desktop": "npm run test:e2e -- --project=desktop",
83
- "test:e2e:update_snapshots": "npm run test:e2e:browser:chrome -- --update-snapshots",
83
+ "test:e2e:update_snapshots": "npm run test:e2e:browser:chrome -- --update-snapshots=changed",
84
84
  "prepare:types": "cross-env MODE=BROWSER npx nuxi prepare"
85
85
  },
86
86
  "dependencies": {
@@ -9,6 +9,8 @@ async function closeAllMenus(window: Page): Promise<void> {
9
9
  await waitForActionSettled(window);
10
10
  }
11
11
 
12
+ const CLOSE_SNACKBAR_TIMEOUT_MS = 2000;
13
+
12
14
  // Snackbars auto-dismiss after 10s (see feedback store), which is too slow to rely on between tests.
13
15
  // Not every action produces a snackbar (e.g. a successful visibility toggle doesn't), so only close it if present.
14
16
  // Some actions stack several (e.g. an assign with an implausible CRS warning): all of them are closed.
@@ -18,8 +20,14 @@ async function closeFeedbackSnackbar(window: Page): Promise<void> {
18
20
  // oxlint-disable no-await-in-loop
19
21
  while ((await snackbars.count()) > 0) {
20
22
  const count = await snackbars.count();
21
- await snackbars.first().getByTestId("feedbackCloseBtn").click();
22
- await expect(snackbars).toHaveCount(count - 1);
23
+ // The snackbar may auto-dismiss between the count and the click: its button is then gone for good
24
+ await snackbars
25
+ .first()
26
+ .getByTestId("feedbackCloseBtn")
27
+ .click({ force: true, timeout: CLOSE_SNACKBAR_TIMEOUT_MS })
28
+ .catch(() => undefined);
29
+ // Several may leave at once (closed and auto-dismissed): only require that one is gone
30
+ await expect(snackbars).not.toHaveCount(count);
23
31
  }
24
32
  // oxlint-enable no-await-in-loop
25
33
  }
@@ -29,18 +29,22 @@ async function resetShrinkFilter(window: Page): Promise<void> {
29
29
  async function toggleShrinkTargetAllVisible(window: Page): Promise<void> {
30
30
  const switchElement = window.getByTestId("shrinkTargetAllVisibleSwitch");
31
31
  const checkbox = switchElement.getByRole("checkbox");
32
- await checkbox.click();
32
+ await checkbox.click({ force: true });
33
33
  await waitForActionSettled(window);
34
34
  }
35
35
 
36
36
  async function selectShrinkDatasets(window: Page, datasetName: string, index = 0): Promise<void> {
37
37
  const select = window.getByTestId("shrinkSelectedDatasetsSelect");
38
- await select.click();
38
+ // Forced clicks skip Playwright's scroll into view, which shifts the layout of the screenshots
39
+ await select.click({ force: true });
39
40
  await waitForActionSettled(window);
40
- const option = window.getByRole("option", { name: datasetName }).nth(index);
41
- await option.click();
41
+ const option = window
42
+ .getByTestId("shrinkSelectedDatasetsOption")
43
+ .filter({ hasText: datasetName })
44
+ .nth(index);
45
+ await option.click({ force: true });
42
46
  await waitForActionSettled(window);
43
- await select.click();
47
+ await select.click({ force: true });
44
48
  await waitForActionSettled(window);
45
49
  }
46
50
 
@@ -62,16 +62,22 @@ async function resetClippingPlanes(window: Page): Promise<void> {
62
62
  }
63
63
 
64
64
  async function toggleTargetAllVisible(window: Page): Promise<void> {
65
- await window.getByTestId("targetAllVisibleSwitch").getByRole("checkbox").click();
65
+ await window.getByTestId("targetAllVisibleSwitch").getByRole("checkbox").click({ force: true });
66
66
  await waitForActionSettled(window);
67
67
  }
68
68
 
69
69
  async function selectClippingDatasets(window: Page, datasetName: string, index = 0): Promise<void> {
70
- await window.getByTestId("selectedDatasetsSelect").click();
70
+ const select = window.getByTestId("selectedDatasetsSelect");
71
+ // Forced clicks skip Playwright's scroll into view, which shifts the layout of the screenshots
72
+ await select.click({ force: true });
71
73
  await waitForActionSettled(window);
72
- await window.getByRole("option", { name: datasetName }).nth(index).click();
74
+ await window
75
+ .getByTestId("selectedDatasetsOption")
76
+ .filter({ hasText: datasetName })
77
+ .nth(index)
78
+ .click({ force: true });
73
79
  await waitForActionSettled(window);
74
- await window.getByTestId("selectedDatasetsSelect").click();
80
+ await select.click({ force: true });
75
81
  await waitForActionSettled(window);
76
82
  }
77
83