vease 1.49.0-rc.2 → 1.49.0-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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { waitForActionSettled } from "./wait_for_action_settled.js";
|
|
2
2
|
import { closeAllMenus, moveMouseOutOfTheWay } from "./app_interaction.js";
|
|
3
3
|
import { dragElement, getHybridViewerCanvas } from "./viewer_interaction.js";
|
|
4
|
+
import { expect } from "@playwright/test";
|
|
4
5
|
//#region tests/e2e/utils/camera_interaction.ts
|
|
5
6
|
async function resetCamera(window) {
|
|
6
7
|
await window.getByTestId("resetCameraButton").click();
|
|
@@ -129,5 +130,21 @@ async function clearRuler(window) {
|
|
|
129
130
|
await window.getByTestId("rulerClearButton").click();
|
|
130
131
|
await waitForActionSettled(window);
|
|
131
132
|
}
|
|
133
|
+
async function activateZoomToBox(window) {
|
|
134
|
+
await closeAllMenus(window);
|
|
135
|
+
await window.getByTestId("zoomToBoxButton").click();
|
|
136
|
+
await waitForActionSettled(window);
|
|
137
|
+
await expect(window.getByTestId("zoomBoxActiveChip")).toBeVisible();
|
|
138
|
+
}
|
|
139
|
+
async function drawZoomBox(window, deltaX, deltaY) {
|
|
140
|
+
const overlay = window.getByTestId("zoomBoxOverlay");
|
|
141
|
+
await dragElement(window, overlay, {
|
|
142
|
+
deltaX,
|
|
143
|
+
deltaY
|
|
144
|
+
});
|
|
145
|
+
await moveMouseOutOfTheWay(window);
|
|
146
|
+
await waitForActionSettled(window);
|
|
147
|
+
await expect(window.getByTestId("zoomBoxActiveChip")).toBeHidden();
|
|
148
|
+
}
|
|
132
149
|
//#endregion
|
|
133
|
-
export { clearRuler, closeCameraManager, ensureHighlightMenuOpen, resetCamera, resetShrinkFilter, restoreCameraPosition, rotateCamera, saveCameraPosition, selectCameraOrientation, selectShrinkDatasets, setRulerPointInput, setShrinkFactor, setZScaling, toggleCameraManager, toggleCameraOrientation, toggleCenterOnClick, toggleGridScale, toggleRuler, toggleRulerSnap, toggleShrinkFilter, toggleShrinkTargetAllVisible };
|
|
150
|
+
export { activateZoomToBox, clearRuler, closeCameraManager, drawZoomBox, ensureHighlightMenuOpen, resetCamera, resetShrinkFilter, restoreCameraPosition, rotateCamera, saveCameraPosition, selectCameraOrientation, selectShrinkDatasets, setRulerPointInput, setShrinkFactor, setZScaling, toggleCameraManager, toggleCameraOrientation, toggleCenterOnClick, toggleGridScale, toggleRuler, toggleRulerSnap, toggleShrinkFilter, toggleShrinkTargetAllVisible };
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Page, expect } from "@playwright/test";
|
|
2
2
|
|
|
3
3
|
import { closeAllMenus, moveMouseOutOfTheWay } from "./app_interaction";
|
|
4
4
|
import { dragElement, getHybridViewerCanvas } from "./viewer_interaction";
|
|
@@ -172,6 +172,21 @@ async function clearRuler(window: Page): Promise<void> {
|
|
|
172
172
|
await waitForActionSettled(window);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
async function activateZoomToBox(window: Page): Promise<void> {
|
|
176
|
+
await closeAllMenus(window);
|
|
177
|
+
await window.getByTestId("zoomToBoxButton").click();
|
|
178
|
+
await waitForActionSettled(window);
|
|
179
|
+
await expect(window.getByTestId("zoomBoxActiveChip")).toBeVisible();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
async function drawZoomBox(window: Page, deltaX: number, deltaY: number): Promise<void> {
|
|
183
|
+
const overlay = window.getByTestId("zoomBoxOverlay");
|
|
184
|
+
await dragElement(window, overlay, { deltaX, deltaY });
|
|
185
|
+
await moveMouseOutOfTheWay(window);
|
|
186
|
+
await waitForActionSettled(window);
|
|
187
|
+
await expect(window.getByTestId("zoomBoxActiveChip")).toBeHidden();
|
|
188
|
+
}
|
|
189
|
+
|
|
175
190
|
export {
|
|
176
191
|
setZScaling,
|
|
177
192
|
resetCamera,
|
|
@@ -194,4 +209,6 @@ export {
|
|
|
194
209
|
toggleRulerSnap,
|
|
195
210
|
setRulerPointInput,
|
|
196
211
|
clearRuler,
|
|
212
|
+
activateZoomToBox,
|
|
213
|
+
drawZoomBox,
|
|
197
214
|
};
|