test(app): scope queued image loads to their file pane

This commit is contained in:
paseo-bot[bot]
2026-11-08 08:02:13 +00:00
parent 858cd5511e
commit d0876e032f
2 changed files with 7 additions and 7 deletions
@@ -766,7 +766,7 @@ test.describe("CodeMirror workspace file editing", () => {
await openWorkspaceFile(page, "pixel.png");
const image = visibleFilePane.locator("img");
await expect(image).toBeVisible();
const imageCanvas = page.getByTestId("image-file-preview-canvas");
const imageCanvas = visibleFilePane.getByTestId("image-file-preview-canvas");
await expect(imageCanvas).toBeVisible();
await imageCanvas.hover();
const transformedContent = imageCanvas.locator(":scope > div").first();
@@ -791,7 +791,7 @@ test.describe("CodeMirror workspace file editing", () => {
width: element.naturalWidth,
height: element.naturalHeight,
}));
const pendingLoad = await holdNextPreviewLoad(page, oldSource.url);
const pendingLoad = await holdNextPreviewLoad(visibleFilePane, oldSource.url);
try {
await writeFile(
path.join(workspace.repoPath, "shape.svg"),