diff --git a/tests/e2e/entities-foundation.e2e.ts b/tests/e2e/entities-foundation.e2e.ts index 30ba8861..532d0d31 100644 --- a/tests/e2e/entities-foundation.e2e.ts +++ b/tests/e2e/entities-foundation.e2e.ts @@ -34,6 +34,14 @@ test("user can place and select typed entities from the entity foundation workfl await expect(page.getByTestId("viewport-snap-preview-topLeft")).toBeVisible(); await clickViewport(page, "topLeft"); const soundEmitterSnapshot = await getEditorStoreSnapshot(page); + expect(soundEmitterSnapshot).toMatchObject({ + toolMode: "select", + viewportTransientState: { + toolPreview: { + kind: "none" + } + } + }); const selectedSoundEmitterId = soundEmitterSnapshot.selection.kind === "entities" ? soundEmitterSnapshot.selection.ids?.[0] ?? null : null; @@ -72,6 +80,15 @@ test("user can place and select typed entities from the entity foundation workfl ); await expect(page.getByTestId("viewport-snap-preview-topLeft")).toBeVisible(); await clickViewport(page, "topLeft"); + const interactableSnapshot = await getEditorStoreSnapshot(page); + expect(interactableSnapshot).toMatchObject({ + toolMode: "select", + viewportTransientState: { + toolPreview: { + kind: "none" + } + } + }); await expect(page.getByTestId("interactable-prompt")).toHaveValue("Use"); await page diff --git a/tests/e2e/import-model-asset.e2e.ts b/tests/e2e/import-model-asset.e2e.ts index e78ba320..4130548a 100644 --- a/tests/e2e/import-model-asset.e2e.ts +++ b/tests/e2e/import-model-asset.e2e.ts @@ -76,8 +76,17 @@ test("imports a model asset, places an instance, and survives reload", async ({ await setViewportCreationPreview(page, "topLeft", { kind: "model-instance", assetId: importedModelAsset.id }, { x: 92, y: 0, z: -76 }); await expect(page.getByTestId("viewport-snap-preview-topLeft")).toBeVisible(); await clickViewport(page, "topLeft"); + const committedSnapshot = await getEditorStoreSnapshot(page); + expect(committedSnapshot).toMatchObject({ + toolMode: "select", + viewportTransientState: { + toolPreview: { + kind: "none" + } + } + }); await expect(page.getByTestId("outliner-model-instance-list").getByRole("button")).toHaveCount(2); - const snapshot = await getEditorStoreSnapshot(page); + const snapshot = committedSnapshot; const selectedModelInstanceId = snapshot.selection.kind === "modelInstances" ? snapshot.selection.ids?.[0] ?? null : null; expect(selectedModelInstanceId).not.toBeNull();