From ebb1dd20aa0cbd41ec7830b28535f2011ee3afa9 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Thu, 5 Nov 2026 10:29:14 -0500 Subject: [PATCH] test: scope cine rasterize tooltip assertions --- tests/specs/polygon-rasterize-segment.e2e.ts | 23 ++++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/specs/polygon-rasterize-segment.e2e.ts b/tests/specs/polygon-rasterize-segment.e2e.ts index 50de73a2f..feec7c810 100644 --- a/tests/specs/polygon-rasterize-segment.e2e.ts +++ b/tests/specs/polygon-rasterize-segment.e2e.ts @@ -39,6 +39,15 @@ const rasterizeMenuParts = async () => { return { item, activator: await item.$('..') }; }; +const expectDisabledRasterizeReason = async (reason: string) => { + const { item, activator } = await rasterizeMenuParts(); + expect(await item.getAttribute('class')).toContain('v-list-item--disabled'); + await activator.moveTo(); + const tooltip = await tooltipOf(activator); + await expect(tooltip).toBeDisplayed(); + await expect(tooltip).toHaveText(reason); +}; + const openPolygonMenuAt = async ( canvas: ChainablePromiseElement, x: number, @@ -221,12 +230,7 @@ describe('Polygon rasterize target', () => { location.y + size.height / 2 - half ); - const { item, activator } = await rasterizeMenuParts(); - expect(await item.getAttribute('class')).toContain('v-list-item--disabled'); - await activator.moveTo(); - const tooltip = await tooltipOf(activator); - await expect(tooltip).toBeDisplayed(); - await expect(tooltip).toHaveText( + await expectDisabledRasterizeReason( 'Unlock this segment to rasterize into it' ); }); @@ -248,12 +252,7 @@ describe('Polygon rasterize target', () => { await AppPage.selectTool('mdi-cursor-default'); await openPolygonMenuAt(canvas, centerX + half, centerY - half); - const { item, activator } = await rasterizeMenuParts(); - expect(await item.getAttribute('class')).toContain('v-list-item--disabled'); - await activator.moveTo(); - const tooltip = $('.v-tooltip.v-overlay--active .v-overlay__content'); - await expect(tooltip).toBeDisplayed(); - await expect(tooltip).toHaveText( + await expectDisabledRasterizeReason( 'Rasterization is not supported for cine images' ); });