Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IR-5702] Unit Test - Spatial XR coverage: System Executes #860

Draft
wants to merge 173 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
e59a25f
tst: Sketch files for all `spatial/XR` module unit tests
heysokam Oct 11, 2024
5f7015a
fmt: Standarize the names of some `XRComponents.ts` components
heysokam Oct 11, 2024
ace557a
tst: Temporarily disable the (wip) `VPSSystem` unit tests
heysokam Oct 11, 2024
4f12fd9
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Oct 30, 2024
c0db60b
tst: Move the `webxr-emulator` and `devtool` folders from `ir-bot`
heysokam Oct 31, 2024
a595339
tst: Apply changes from #583
heysokam Nov 1, 2024
8c549d8
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 1, 2024
9710ab6
fixes for webxr emulator tests
HexaField Nov 2, 2024
7223724
tst: Remove redundant todo note about the webxr test not passing
heysokam Nov 4, 2024
fc2640d
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 4, 2024
8f37d1b
tst: Add `webxr-emulator` to the `.prettierignore` list
heysokam Nov 4, 2024
405b472
tst: Add `webxr-emulator` to the eslint ignore list
heysokam Nov 4, 2024
29ab0a7
fmt: Remove deprecated access of `viewerEntity` from `Engine`
heysokam Nov 4, 2024
2ca4737
tst: Unit Tests for all static data of the `spatial/xr` module
heysokam Nov 4, 2024
59d9978
tst: Document the `VPSSystem` definition bug
heysokam Nov 4, 2024
9d0272b
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 4, 2024
bba083a
tst: Activate the VPSSystem tests. Import bug is gone
heysokam Nov 5, 2024
a5d4546
tst: Simplify WebXR test imports by adding `requestEmulatedXRSesssion`
heysokam Nov 5, 2024
9d61833
tst: Unit Tests for `XRSessionFunctions.ts` (phase 1)
heysokam Nov 5, 2024
1e3c6aa
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 5, 2024
083b0b5
tst: Unit Tests for `XRSessionFunctions.ts` (phase 2)
heysokam Nov 6, 2024
94ec5fd
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 6, 2024
6cfbaac
tst: Add the webxr-emulator folders to the tsconfig.exclude array
heysokam Nov 6, 2024
09935df
tst: Also add `emulator.ts` to the tsconfig.exclude array
heysokam Nov 6, 2024
06aba0e
fix: Accidental change to `XRSession.onSessionEnd` floor and origin
heysokam Nov 7, 2024
d0f7756
tst: Add `.style` property to the MockRenderer canvas
heysokam Nov 7, 2024
e196ff9
tst: Add `mockEmulatedXREngine` helper functions
heysokam Nov 7, 2024
c412ae1
tst: Unit Tests for `XRSessionFunctions.ts` (phase 3)
heysokam Nov 7, 2024
bb485fe
tst: Add VSCode `vitest run - spatial : Current File` debug launcher
heysokam Nov 7, 2024
e05831b
tst: Bugfix for `XRSessionFunctions.ts/onSessionEnd` unit tests
heysokam Nov 7, 2024
c92252a
tst: Unit Tests for `XRState.ts` (phase 1)
heysokam Nov 8, 2024
6f4882b
tst: Add `getViewerPose` function to `MockXRFrame`
heysokam Nov 8, 2024
75a5750
tst: Update `WebXR Emulator` test to use the helper functions
heysokam Nov 8, 2024
1733267
tst: Unit Tests for `XRState.ts` (phase 2)
heysokam Nov 8, 2024
fce887a
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 8, 2024
7a63b1d
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 13, 2024
2134dc5
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 13, 2024
db28b4a
tst: Fix errors on wrong imports
heysokam Nov 13, 2024
2727993
fmt: Remove deprecated `cameraEntity` access. Add `foveation` arg type
heysokam Nov 13, 2024
aeb6e6a
tst: Fix SingleFile VSCode debug runner launch command
heysokam Nov 14, 2024
cdd8fb5
tst: Unit Tests for `WebXRManager.ts` (phase 2)
heysokam Nov 14, 2024
39b153e
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 14, 2024
104fc1f
fix: Hookstate-202 triggered when calling `.setFoveation`
heysokam Nov 14, 2024
7aa12a9
fmt: Flatten the `XRPersistentAnchorSystem.execute` arrow pattern
heysokam Nov 14, 2024
5accfe0
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 15, 2024
1882641
tst: Fix assert helpers for #363
heysokam Nov 15, 2024
b0d4372
tst: Unit Tests for `XRPersistentAnchorSystem.ts` (phase 1)
heysokam Nov 15, 2024
b2515db
tst: Add MockXRAnchor to `MockXR.ts`
heysokam Nov 15, 2024
cfbad33
tst: Unit Tests for `XRPersistentAnchorSystem.ts` (phase 2)
heysokam Nov 15, 2024
8cecdb0
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 15, 2024
5668f92
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 16, 2024
acc29d3
fmt: Add typesafety hint to the result of `createPersitentAnchor`
heysokam Nov 16, 2024
ff2854a
tst: Add `requestPersistentHandle` prototype to `MockXRSpace`
heysokam Nov 16, 2024
8780c7a
tst: Unit Tests for `XRPersistentAnchorSystem.ts` (phase 3)
heysokam Nov 16, 2024
9a61b07
fmt: Remove deprecated Engine.instance access. Flatten arrow pattern
heysokam Nov 16, 2024
69957f5
tst: Attempt to fix `xrFrame.session` being undefined after mocking
heysokam Nov 16, 2024
0547b8d
tst: Unit Tests for `XRCameraViewSystem.ts`
heysokam Nov 16, 2024
42af423
tst: Unit Tests for `XRCameraSystem.ts` (phase 1)
heysokam Nov 16, 2024
dd5528b
tst: Static fields tests for most XR systems
heysokam Nov 16, 2024
d270a09
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 19, 2024
c096e46
tst: Unit Tests for `XRLightProbeSystem.ts` (phase 2)
heysokam Nov 19, 2024
889d6d6
tst: Unit Tests for `XRScenePlacementShaderSystem.ts` (phase 1)
heysokam Nov 19, 2024
469aff1
tst: Unit Tests for `XRSystem.ts` (phase 1)
heysokam Nov 19, 2024
10ee41b
tst: Unit Tests for `XR8.ts` (phase 1)
heysokam Nov 19, 2024
3eaba69
fmt: Expose `Wayspot*Event` functions as types from `XR8Types`
heysokam Nov 19, 2024
4c883af
fmt: Reorder the `XR8Pipeline.listeners` array to match the api list
heysokam Nov 19, 2024
a2dbb3b
tst: Unit Tests for `XR8Pipeline.ts` (phase 1)
heysokam Nov 19, 2024
7e3a72e
tst: Unit Tests for `XR8Pipeline.ts` (phase 2)
heysokam Nov 19, 2024
028243d
tst: Remove webxr-emulator from the branch. It is now on dev
heysokam Nov 20, 2024
09750d1
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 20, 2024
e817174
tst: Unit Tests for `XR8Pipeline.ts` (phase 3)
heysokam Nov 20, 2024
a1f0cfd
tst: Unit Tests for `XRAnchorSystem.ts` (phase 1)
heysokam Nov 20, 2024
f757b90
fmt: Remove deprecated use of `Engine.instance`
heysokam Nov 20, 2024
c8d5150
tst: Unit Tests for `XR8WebXRProxy.ts` (phase 1)
heysokam Nov 20, 2024
698781a
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 20, 2024
b478740
tst: Reorganize some todo groups
heysokam Nov 20, 2024
2dfee01
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 21, 2024
6ce5cd9
tst: Move `getIncomingAction` from XR8Pipeline to a `tests/util` file
heysokam Nov 22, 2024
e95bdac
tst: Sketch for `getXRSessionEventtTargetData` helper function
heysokam Nov 22, 2024
b47484d
tst: Unit Tests for `XRSessionFunctions.ts` (phase 4)
heysokam Nov 22, 2024
08403e7
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 22, 2024
81bce7e
tst: Fix `deviceDefinition` incorrectly assigned to `device`
heysokam Nov 23, 2024
50baae6
tst: Unit Tests for `XRSessionFunctions.ts` (phase 5)
heysokam Nov 23, 2024
627a1c3
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 23, 2024
af7782c
tst: Fix unnecessary double quotes
heysokam Nov 23, 2024
33b8dd9
fmt: Remove deprecated usage of `Engine.instance.localFloorEntity`
heysokam Nov 23, 2024
f06a86e
tst: Unit Tests for `XRDetectedMeshComponent.ts` (phase 2)
heysokam Nov 23, 2024
1ff8522
tst: Unit Tests for `XRDetectedPlaneComponent.ts` (phase 2)
heysokam Nov 23, 2024
fccc42f
fmt: Remove deprecated usage of `Engine.instance`
heysokam Nov 26, 2024
145713e
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 26, 2024
ae3b808
fmt: Rename/Group Dollhouse module scope constants for clarity
heysokam Nov 26, 2024
ff2df74
fmt: Change `XRAnchorComponent` to optional getter at `updateAnchor`
heysokam Nov 26, 2024
43a100c
tst: Unit Tests for `XRAnchorSystem.ts` (phase 2)
heysokam Nov 26, 2024
f5d1a74
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 26, 2024
fdb9c1a
tst: Unit Tests for `XRAnchorSystem.ts` (phase 3)
heysokam Nov 27, 2024
151dd0c
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Nov 27, 2024
9f5b233
fmt: Flatten conditionals at `updateDepthMaterials` & `updateUniforms`
heysokam Nov 27, 2024
b78c5ce
tst: List of missing todo cases for `WebXRManager.ts`
heysokam Nov 27, 2024
72a4894
tst: List of missing todo cases for `XRDepthOcclussion.ts`
heysokam Nov 27, 2024
61601c0
tst: List of missing todo cases for `XRDetectedMeshSystem.ts`
heysokam Nov 27, 2024
20a33a6
tst: List of missing todo cases for `XRState.ts`
heysokam Nov 27, 2024
ac46357
fmt: Flatten the `scope.setSession` function with clause guard
heysokam Nov 27, 2024
d4ee9ce
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 2, 2024
4c4b190
tst: Unit Tests for `XRDepthOcclusion.ts` (phase 2)
heysokam Dec 2, 2024
303fb0e
tst: Unit Tests for `XRDepthOcclusion.ts` (phase 3)
heysokam Dec 4, 2024
ca1b17a
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 4, 2024
0744679
tst: Unit Tests for `XRDepthOcclusion.ts` (phase 4)
heysokam Dec 4, 2024
345c59b
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 4, 2024
74e000b
fmt: Export functions as `XRDetectedMeshSystemFunctions`
heysokam Dec 5, 2024
8cfd315
tst: Unit Tests for `XRDetectedMeshSystem.ts` (phase 2)
heysokam Dec 5, 2024
e7f3d2b
tst: Unit Tests for `XRDetectedMeshSystem.ts` (phase 3)
heysokam Dec 5, 2024
7520a78
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 5, 2024
e03267a
tst: Unit Tests for `XRState.ts` (phase 3)
heysokam Dec 5, 2024
74da4f5
fmt: Split the `setSession` scope function to make it testable
heysokam Dec 5, 2024
d4d3123
Revert "fmt: Split the `setSession` scope function to make it testable"
heysokam Dec 5, 2024
870800e
tst: Unit Tests for `WebXRManager.ts` (phase 3)
heysokam Dec 5, 2024
bfda79a
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 5, 2024
c4f911d
fmt: Split the WebXRManager factory members into dedicated functions
heysokam Dec 6, 2024
435b3fc
tst: Unit Tests for `WebXRManager.ts` (phase 4)
heysokam Dec 6, 2024
60a9798
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 6, 2024
ff3374f
fmt: Improve the WebXRManager factory function setSession section
heysokam Dec 6, 2024
33eeb26
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 6, 2024
d6ccf64
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 9, 2024
cc816e4
Revert "fmt: Improve the WebXRManager factory function setSession sec…
heysokam Dec 10, 2024
fcaa04b
Revert "fmt: Split the WebXRManager factory members into dedicated fu…
heysokam Dec 10, 2024
661fbbb
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 10, 2024
7a3138b
tst: Add `setRenderTarget` to `MockRenderer`
heysokam Dec 10, 2024
0208ba3
fmt: Rename `scope` to `manager` for clarity and add type hints
heysokam Dec 10, 2024
5d5a53d
tst: Unit Tests for `WebXRManager.ts` (phase 5) (Multi-func refactor)
heysokam Dec 10, 2024
3023013
tst: Fix eslint error for `no-extra-boolean-call` on `XRState.test.ts`
heysokam Dec 10, 2024
5556229
tst: Unit Tests for `WebXRManager.ts` (phase 6)
heysokam Dec 10, 2024
579d517
tst: Engine init before/after block for each function separately
heysokam Dec 10, 2024
4e677e2
fmt: Call all WebXRManagerFunctions from the exported object
heysokam Dec 10, 2024
283c6a2
tst: Unit Tests for `WebXRManager.ts` (phase 7)
heysokam Dec 10, 2024
4edd06c
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 10, 2024
8beeaa1
fmt: Simplify the `createRenderTargetLegacy` function
heysokam Dec 10, 2024
d37aa11
tst: Fix tests for `setSession` not waiting for its completion
heysokam Dec 10, 2024
cf83f9c
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 10, 2024
cbc1da2
tst: Unit Tests for `WebXRManager.ts` (phase 8) (missing statements)
heysokam Dec 11, 2024
bd2ec60
fix: Stranded `this.` call inside the `WebXRManager` factory function
heysokam Dec 11, 2024
2f8e2f7
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 11, 2024
405dc0c
tst: Unit Tests for `WebXRManager.ts` (phase 9) (simplify statements)
heysokam Dec 11, 2024
1180384
tst: Export XREmulator helpers as an object. Add `getXRWebGLLayerData`
heysokam Dec 11, 2024
1b540f3
tst: Unit Tests for `WebXRManager.ts` (phase 10)
heysokam Dec 11, 2024
5115920
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 11, 2024
9ace077
tst: Unit Tests for `WebXRManager.ts` (phase 11)
heysokam Dec 11, 2024
7dd1e84
tst: Add `XRWebGLBinding` polyfill and mock
heysokam Dec 12, 2024
3c0e66b
tst: Unit Tests for `WebXRManager.ts` (phase 12)
heysokam Dec 12, 2024
331d79d
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 12, 2024
58adea3
tst: Improve the `XRWebGLBinding` polyfill mock
heysokam Dec 12, 2024
a8ad4f9
tst: Unit Tests for `WebXRManager.ts` (phase 13)
heysokam Dec 12, 2024
8a1eced
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 12, 2024
f01370e
tst: Unit Tests for `WebXRManager.ts` (phase 14)
heysokam Dec 12, 2024
0e02b64
tst: Add missing `XRSession` assignment on the XREngine mock
heysokam Dec 12, 2024
5433aaa
tst: Fixes for todo tests at `XRPersistentAnchorSystem`
heysokam Dec 13, 2024
6a70933
tst: Add `immersive-ar` to the list of supported WebXR emulated modes
heysokam Dec 13, 2024
371d9dd
tst: Unit Tests for `XRSessionFunctions.ts` (phase 6) (todo fixes)
heysokam Dec 13, 2024
a358ba7
tst: Note about an 8thWall-only test case
heysokam Dec 13, 2024
c723cf8
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 13, 2024
594f832
tst: Add helper for getting the last dispatched action from history
heysokam Dec 13, 2024
127209e
tst: Unit Tests for `XRSessionFunctions.ts` (phase 7)
heysokam Dec 13, 2024
5d20d2d
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 17, 2024
916744c
Merge branch 'dev' into IR-3427-unit-test-XR-coverage-to-80
heysokam Dec 18, 2024
84381bb
tst: Skip note for `XRCameraViewSystem`
heysokam Dec 18, 2024
2a7b641
tst: Statements for `XRDepthOcclusionSystem` unit tests
heysokam Dec 18, 2024
e9102df
tst: Statements for `XRHapticsSystem` unit tests
heysokam Dec 18, 2024
a5fea1d
tst: Statements for `XRLightProbeSystem` unit tests
heysokam Dec 19, 2024
ac49774
tst: Statements for `XRDetectedMeshSystem` unit tests
heysokam Dec 19, 2024
3fb70fc
fmt: Remove deprecated usage of `Engine.instance`
heysokam Dec 19, 2024
202bbd4
tst: Statements for `XRCameraSystem` unit tests
heysokam Dec 19, 2024
84e6665
fmt: Prefix module-scope variables at `XRCameraSystem.ts` with `_`
heysokam Dec 19, 2024
2c4da38
tst: Statements for `XRSystem` unit tests
heysokam Dec 19, 2024
1f23889
tst: Statements for `XRAnchorSystem` unit tests
heysokam Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tst: Statements for XRLightProbeSystem unit tests
  • Loading branch information
heysokam committed Dec 19, 2024
commit a5fea1d59e05491d48924f893969710c13de0984
36 changes: 35 additions & 1 deletion packages/spatial/src/xr/XRLightProbeSystem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,42 @@ describe('XRLightProbeSystem', () => {
}) //:: Fields

/** @todo */
describe('execute,', () => {}) //:: execute
describe('reactor', () => {}) //:: reactor

/** @todo */
describe('execute,', () => {
it.todo('should not do anything if XRState.xrFrame is falsy', () => {})
it.todo('should not do anything if XRLightProbeState.probe is falsy', () => {})
it.todo("should not do anything if XRState.xrFrame does not have a property named 'getLightEstimate'", () => {})
it.todo('should call XRState.xrFrame.getLightEstimate with XRLightProbeState.probe', () => {})
it.todo(
'should not do anything else if the return value of XRState.xrFrame.getLightEstimate(XRLightProbeState.probe) is falsy',
() => {}
)
it.todo('should set XRLightProbeState.isEstimatingLight to true if its falsy', () => {})
it.todo('should not do anything else if XRLightProbeState.directionalLightEntity is falsy', () => {})
it.todo(
'should set XRLightProbeState.lightProbe.sh to XRState.xrFrame.getLightEstimate(XRLightProbeState.probe).sphericalHarmonicsCoefficients',
() => {}
)
it.todo('should set XRLightProbeState.lightProbe.intensity to 1.0', () => {})
it.todo(
'should create an internal intensityScalar variable by calling Math.max with the expected values (@todo How to check/control these in a sane way)',
() => {}
)
it.todo(
'should set XRLightProbeState.directionalLightEntity.DirectionalLightComponent.color to the expected color (@todo How to check/control their values)',
() => {}
)
it.todo(
'should set XRLightProbeState.directionalLightEntity.DirectionalLightComponent.intensity to the intensityScalar variable (@todo How to check for the value of this variable)',
() => {}
)
it.todo(
'should set XRLightProbeState.directionalLightEntity.TransformComponent.rotation from the vectors (Vector3_Zero, lightEstimate.primaryLightDirection)',
() => {}
)
}) //:: execute
}) //:: XRLightProbeSystem

describe('XRLightProbeState', () => {
Expand Down