diff --git a/packages/scene-composer/e2e/tests/local-scene/scene-composer--local-scene.spec.ts b/packages/scene-composer/e2e/tests/local-scene/scene-composer--local-scene.spec.ts index ad324c65c..8a361c863 100644 --- a/packages/scene-composer/e2e/tests/local-scene/scene-composer--local-scene.spec.ts +++ b/packages/scene-composer/e2e/tests/local-scene/scene-composer--local-scene.spec.ts @@ -20,7 +20,7 @@ test.describe('scene-composer--local-scene', () => { test('get object by name', async ({ page }) => { const state = new PlaywrightHelper(page, localScene); - const palletJack = await state.getObjecByName('PalletJack'); + const palletJack = await state.getObjectByName('PalletJack'); // assert expected values on object expect(palletJack.isObject3D).toBeTruthy(); @@ -30,7 +30,7 @@ test.describe('scene-composer--local-scene', () => { test('validate hierarchy interaction', async ({ page }) => { const state = new PlaywrightHelper(page, localScene); - const palletJack = await state.getObjecByName('PalletJack'); + const palletJack = await state.getObjectByName('PalletJack'); // select object in hierarchy await page.getByTestId(palletJack.userData.componentRef).click(); diff --git a/packages/scene-composer/e2e/tests/utils/sceneHelpers.ts b/packages/scene-composer/e2e/tests/utils/sceneHelpers.ts index 84f77fec4..df156f833 100644 --- a/packages/scene-composer/e2e/tests/utils/sceneHelpers.ts +++ b/packages/scene-composer/e2e/tests/utils/sceneHelpers.ts @@ -35,15 +35,15 @@ export class PlaywrightHelper { this.localScene = localScene; } - async goto(localScene: string) { + async goto(localScene: string): Promise { await this.page.goto(localScene); } - async getFrame(localFrame: string) { + async getFrame(localFrame: string): Promise { return this.page.locator(localFrame); } - async getSceneId(frame: Locator) { + async getSceneId(frame: Locator): Promise { const sceneId: string = await frame.evaluate(async () => { return await new Promise((res, rej) => { const timer = setTimeout( @@ -64,14 +64,14 @@ export class PlaywrightHelper { return sceneId; } - async tmScene(frame: Locator, sceneId: string) { + async tmScene(frame: Locator, sceneId: string): Promise { const sceneResult = await frame.evaluate((_element: HTMLElement, sceneId: string) => { return Promise.resolve(window['__twinmaker_tests'][sceneId].scene); }, sceneId); return sceneResult; } - async getScene() { + async getScene(): Promise<{ frame: Locator; sceneId: string; scene: Scene }> { await this.page.goto(this.localScene); const frame = this.page.locator('#root'); const sceneId = await this.getSceneId(frame); @@ -107,7 +107,7 @@ export class PlaywrightHelper { } // map harness functions here - async getObjecByName(name: string) { + async getObjectByName(name: string) { return await this.playwrightState('getObjecByName', name); } } diff --git a/packages/scene-composer/src/components/panels/SceneHierarchyPanel/components/SceneHierarchyTree/SceneHierarchyTreeItem.tsx b/packages/scene-composer/src/components/panels/SceneHierarchyPanel/components/SceneHierarchyTree/SceneHierarchyTreeItem.tsx index 16e916cbc..b4f7ee6a9 100644 --- a/packages/scene-composer/src/components/panels/SceneHierarchyPanel/components/SceneHierarchyTree/SceneHierarchyTreeItem.tsx +++ b/packages/scene-composer/src/components/panels/SceneHierarchyPanel/components/SceneHierarchyTree/SceneHierarchyTreeItem.tsx @@ -96,7 +96,7 @@ const SceneHierarchyTreeItem: FC = ({ key={key} labelNode={ 0 ? node?.components[0].ref : undefined} objectRef={key} labelText={labelText} componentTypes={componentTypes} diff --git a/packages/scene-composer/src/components/panels/SceneNodeInspectorPanel.tsx b/packages/scene-composer/src/components/panels/SceneNodeInspectorPanel.tsx index aa8613143..f997e6104 100644 --- a/packages/scene-composer/src/components/panels/SceneNodeInspectorPanel.tsx +++ b/packages/scene-composer/src/components/panels/SceneNodeInspectorPanel.tsx @@ -131,7 +131,9 @@ export const SceneNodeInspectorPanel: React.FC = () => { > 0 ? `ip-${selectedSceneNode.components[0].ref}` : undefined + } value={selectedSceneNode.name} setValue={(e) => handleInputChanges({ name: e?.toString() })} />