mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 16:49:42 +00:00
Hide image controls when tagging, and hide compass HUD by default (#7028)
* make compass HUD configurable and hide image controls when tagging * lint fixes * address PR comments * change prop to inject --------- Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
@ -57,6 +57,10 @@ test.describe('Example Imagery Object', () => {
|
||||
await mouseZoomOnImageAndAssert(page, -2);
|
||||
});
|
||||
|
||||
test('Compass HUD should be hidden by default', async ({ page }) => {
|
||||
await expect(page.locator('.c-hud')).toBeHidden();
|
||||
});
|
||||
|
||||
test('Can adjust image brightness/contrast by dragging the sliders', async ({
|
||||
page,
|
||||
browserName
|
||||
@ -198,7 +202,7 @@ test.describe('Example Imagery Object', () => {
|
||||
expect(afterDownPanBoundingBox.y).toBeLessThan(afterUpPanBoundingBox.y);
|
||||
});
|
||||
|
||||
test('Can use alt+shift+drag to create a tag', async ({ page }) => {
|
||||
test('Can use alt+shift+drag to create a tag and ensure toolbars disappear', async ({ page }) => {
|
||||
const canvas = page.locator('canvas');
|
||||
await canvas.hover({ trial: true });
|
||||
|
||||
@ -211,7 +215,11 @@ test.describe('Example Imagery Object', () => {
|
||||
// steps not working for me here
|
||||
await page.mouse.move(canvasCenterX - 20, canvasCenterY - 20);
|
||||
await page.mouse.move(canvasCenterX - 100, canvasCenterY - 100);
|
||||
// toolbar should hide when we're creating annotations with a drag
|
||||
await expect(page.locator('[role="toolbar"][aria-label="Image controls"]')).toBeHidden();
|
||||
await page.mouse.up();
|
||||
// toolbar should reappear when we're done creating annotations
|
||||
await expect(page.locator('[role="toolbar"][aria-label="Image controls"]')).toBeVisible();
|
||||
await Promise.all(tagHotkey.map((x) => page.keyboard.up(x)));
|
||||
|
||||
//Wait for canvas to stabilize.
|
||||
|
Reference in New Issue
Block a user