From b2438a85d2d317350c3b7ebcf634c1acee1ec4d6 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 3 Apr 2026 00:04:59 +0200 Subject: [PATCH] Enhance e2e test for local lights and background by adding viewport interactions --- tests/e2e/local-lights-and-background.e2e.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/e2e/local-lights-and-background.e2e.ts b/tests/e2e/local-lights-and-background.e2e.ts index b8825636..969a1b54 100644 --- a/tests/e2e/local-lights-and-background.e2e.ts +++ b/tests/e2e/local-lights-and-background.e2e.ts @@ -2,6 +2,8 @@ import path from "node:path"; import { expect, test } from "@playwright/test"; +import { getViewportCanvas } from "./viewport-test-helpers"; + const panoramaFixturePath = path.resolve(process.cwd(), "fixtures/assets/skybox-panorama.svg"); test("local lights and background images persist through editor and runner flows", async ({ page }) => { @@ -37,6 +39,9 @@ test("local lights and background images persist through editor and runner flows await page.getByTestId("outliner-add-button").click(); await page.getByTestId("add-menu-lights").click(); await page.getByTestId("add-menu-point-light").click(); + const viewportCanvas = getViewportCanvas(page); + await viewportCanvas.hover({ position: { x: 172, y: 116 }, force: true }); + await viewportCanvas.click({ position: { x: 172, y: 116 }, force: true }); await expect(page.getByTestId("point-light-distance")).toHaveValue("8"); await page.getByTestId("point-light-distance").fill("12"); await page.getByTestId("point-light-distance").press("Tab"); @@ -44,6 +49,8 @@ test("local lights and background images persist through editor and runner flows await page.getByTestId("outliner-add-button").click(); await page.getByTestId("add-menu-lights").click(); await page.getByTestId("add-menu-spot-light").click(); + await viewportCanvas.hover({ position: { x: 240, y: 132 }, force: true }); + await viewportCanvas.click({ position: { x: 240, y: 132 }, force: true }); await expect(page.getByTestId("spot-light-angle")).toHaveValue("35"); await page.getByTestId("spot-light-angle").fill("48"); await page.getByTestId("spot-light-angle").press("Tab");