diff --git a/e2e/playwright/flow-tests.spec.ts b/e2e/playwright/flow-tests.spec.ts index b5ffaacc8..25f3c0bfd 100644 --- a/e2e/playwright/flow-tests.spec.ts +++ b/e2e/playwright/flow-tests.spec.ts @@ -4179,12 +4179,15 @@ test.describe('Sketch tests', () => { await page.setViewportSize({ width: 1200, height: 500 }) await u.waitForAuthSkipAppStart() - await page.getByText('tangentialArcTo([24.95, -5.38], %)').click() - await expect( - page.getByRole('button', { name: 'Edit Sketch' }) - ).toBeEnabled() - await page.getByRole('button', { name: 'Edit Sketch' }).click() + await expect(async () => { + await page.mouse.click(700, 200) + await page.getByText('tangentialArcTo([24.95, -5.38], %)').click() + await expect( + page.getByRole('button', { name: 'Edit Sketch' }) + ).toBeEnabled({ timeout: 1000 }) + await page.getByRole('button', { name: 'Edit Sketch' }).click() + }).toPass({ timeout: 40_000, intervals: [1_000] }) await page.waitForTimeout(600) // wait for animation diff --git a/src/hooks/useSetupEngineManager.ts b/src/hooks/useSetupEngineManager.ts index 2f4a10794..81bef5b6f 100644 --- a/src/hooks/useSetupEngineManager.ts +++ b/src/hooks/useSetupEngineManager.ts @@ -186,6 +186,7 @@ export function useSetupEngineManager( } function getDimensions(streamWidth?: number, streamHeight?: number) { + const factorOf = 4 const maxResolution = 2000 const width = streamWidth ? streamWidth : 0 const height = streamHeight ? streamHeight : 0 @@ -193,7 +194,7 @@ function getDimensions(streamWidth?: number, streamHeight?: number) { Math.min(maxResolution / width, maxResolution / height), 1.0 ) - const quadWidth = Math.round((width * ratio) / 4) * 4 - const quadHeight = Math.round((height * ratio) / 4) * 4 + const quadWidth = Math.round((width * ratio) / factorOf) * factorOf + const quadHeight = Math.round((height * ratio) / factorOf) * factorOf return { width: quadWidth, height: quadHeight } }