decentraland / decentraland/sdk

Test plan for SDK Components

Open
#348 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
4
Forks
5
PR merge metrics
No merged PRs in 30d

Description

# Test plan

This is a series of tests for validating that all components in the new ECS7 work as expected

## Transform

- [ ] Remove transform component from entity, does it revert to defaults?
- [ ] Add and remove transform component with transformations, any residual transformation remains?
- [ ] Add parented entities, each with their own transformation. Do the children follow scale, position & rotation of parent + their own?
- [ ] Switch the parents of an entity dynamically back and forth by pressing a button. Any residual transformations?
- [ ] Move/rotate/shrink parent. Does it also affect the children?
- [ ] If parent & child both leave scene bounds, are both marked as out?
- [ ] If parent is out of scene bounds but child still in, child shouldn’t be marked
- [ ] Add a huge entity (w a GLTFShape), bigger than the scene, with scale of 0.01. Does it first load at its original size at 0,0,0? Does it stay marked as out of bounds?
- [ ] Parent an entity to the camera entity
- [ ] Parent an entity to the avatar entity

## All shapes (including GLTFShape and NFTShape)

- [ ] Start with/without colliders
- [ ] Start with/without pointer blocker
- [ ] Add/remove colliders dynamically
- [ ] Add/remove pointerblocker dynamically
- [ ] Start invisible, make visible/invisible

## Boxshape

- [ ] Check orientation of image textures vs video textures. Are they facing the same way?
- [ ] Change UVs dynamically, can I do this? does it affect other instances of BoxShape?

## PlaneShape

- [ ] Check orientation of image textures vs video textures. Are they facing the same way?
- [ ] Change UVs dynamically, can I do this? does it affect other instances of BoxShape?
- [ ] Do colliders work in both directions?

## CylinderShape

- [ ] Change radiusTop & radiusBottom dynamically. Do changes affect other instances?

## NFT Shape

- [ ] Fetch a regular NFT. Validate that it compresses at a further distance
- [ ] Fetch a gif NFT. Validate that it only plays at a certain distance
- [ ] Try different frame shapes, verify they all work
- [ ] Add new NFTShape entities after the scene is initialized

## GLTF Shape

- [ ] Add a heavy 3d model (+ 10MB) once the scene is already loaded, does it first load on the position 0,0 or at the default scale? Do we see the green matrix shader as it loads?
- [ ] Prepare a scene with multiple different material settings, including transparency, reflectivity, emissive, bump textures, etc
- [ ] PBR Material with different settings (same mesh)
- [ ] Basic Material with different settings (same mesh)
- [ ] Load same GLTF with different internal material values (specially metallic/specular)
- [ ] Load same GLTF exported in its 3 possible formats (GLTF + external textures, GLB + external textures, GLB with internal textures)
- [ ] Instance an entity with custom collision settings, to use the visible layer for either pointer events or physics collisions
- [ ] Change the collision settings of an already loaded entity

## MeshCollider

- [ ] Instance an entity with custom collision settings, either pointer events or physics collisions
- [ ] Change the collision settings of an already loaded entity

## TextShape

- [ ] Multiple samples including multi-line text, different sizes, colors, etc
- [ ] Change text on existing entity
- [ ] Change scale/font/color/other properties

## AudioSource

- [ ] Play sound at different pitches
- [ ] Play at different volumes
- [ ] loop, stop, play again
- [ ] Start playing, change volume as it plays
- [ ] Start playing, change pitch as it plays

## AudioStream

- [ ] Stop, play again
- [ ] Switch streams
- [ ] Start with lower volume
- [ ] Change volume while it plays

## Animator

- [ ] Entity with no animator loops first animation by default
- [ ] Entity with animator is still by default
- [ ] Loop an animation
- [ ] Play/pause an animation on command, resuming from where it stopped
- [ ] Play an animation on command, starting from the start every time
- [ ] Play an animation with varying weight values
- [ ] Play an animation with varying speeds
- [ ] Multiple entities w same model, play animations in only one instance without affecting the others
- [ ] Play animation A, start animation B before animation A ends

## Material

- [ ] Materials with different settings, including transparency, emissive, textures with uv mapping, transparency mask textures, etc
- [ ] Change a texture
- [ ] Change a uv mapping

## PointerEvents

- [ ] Entities with custom hovertext, different max distance, hovertext dissabled, different buttons
- [ ] Change hovertext dynamically

## 
pointerEventsSystem

**Pointer Down**
- [ ] Activate BoxShape with MeshCollider with OnPointerDown
- [ ] Activate 3d model with built-in collider mesh with OnPointerDown
- [ ] Activate 3d model without collider, and visible geometry layer assigned to pointer events, with OnPointerDown
- [ ] Try different button activations
- [ ] Try all of the above in 1st & 3rd person
- [ ] Try detecting global button events for all valid buttons: E, F, A, W, S, D, 1, 2, 3, 4, SPACE, SHIFT

**Pointer Up**:
- [ ] Activate BoxShape with MeshCollider with OnPointerUp
- [ ] Activate 3d model with built-in collider mesh with OnPointerUp
- [ ] Activate 3d model without collider, and visible geometry layer assigned to pointer events, with OnPointerUp
- [ ] Entity with both OnPounterDown & OnPointerUp, does the pointerUp hover text only show while I’m holding the key?

**Hover enter**
- [ ] Try setting maximum distance, at a greater distance
- [ ] Try pointing at item while too far, then walking into range (without pointing away)
- [ ] Try all of the above in 1st & 3rd person


## AvatarAttach

- [ ] Attach an entity that already had a parent in the Transform. Is the Transform parent ignored?
- [ ] Attach an entity that already had a parent via the parentEntity function (serverless multiplayer). Is the parent ignored?
- [ ] Attach an entity that has its own child, does the child maintain the relative transform?
- [ ] Attach and put back repeatedly, any residual transformations?
- [ ] Attach an entity that already had its own Transform, are the Transform values ignored? If the player attachment is removed, does the entity go back to using the Transform?
- [ ] Attach to different player bones
- [ ] Attach an entity to the player, does this entity disappear when the player walks outside the scene? Does it appear again when walking back in?

## 
AvatarModifierArea

- [ ] Hide other players, check that other players are hidden for everyone
- [ ] Hide other players with exceptions, do the players in the exceptions list get treated as expected?
- [ ] Change the list of exception players after the players are inside. Do they appear/disappear?
- [ ] Nest multiple modifier areas, do they each behave as expected?
- [ ] Make a modifier area appear where the player is already standing, does it affect the player?
- [ ] Make a modifier area grow to absorb the player, while the player doesn’t move. Does it still affect the player?
- [ ] Load the scene with the player spawning inside a modifier area, does the player get affected by it?
- [ ] Create a modifier area the extends outside scene bounds, does it affect the player outside the scene bounds? Does it affect the player in the parts that are correctly inside the scene bounds?
- [ ] When players hidden, can we still hear their steps or see puffs of smoke when they walk?


## CameraModeArea
- [ ] same as avatar modifier

## AvatarShape

- [ ] Move avatarshape outside the scene, does it stop being rendered?
- [ ] Change wearables
- [ ] Trigger emotes
- [ ] Change entity position, does it walk to new position or teleport?
- [ ] Play a default emote on the avatar
- [ ] Play a custom emote from a file on the avatar

## Billboard

- [ ] Give an entity a Transform w a rotation, then a Billboard. Then change the rotation of the Transform. Does the rotation of the transform have an effect? Does the position & scale of the transform still work?
- [ ] Give an entity a Transform w a rotation, then a Billboard, then remove the Billboard. Does the entity go back to using the rotation from the Transform?
- [ ] Try in 1st and 3rd camera. Does the billboard follow the avatar or the camera?
- [ ] Try a billboard on an entity with a TextShape, is the text legible?

## Tween

- [ ] Move / Scale / Rotate an entity
- [ ] Move / Scale / Rotate an entity with children, do the children also follow the transformation?
- [ ] Add a trigger to an entity that moves with a Tween, does the trigger still work?
- [ ] Move an entity back and forth with several tweens, any residual effect?
- [ ] Try hot reload on a scene with tweens. Any residual effect on other entities? (used to be a bug)

## Teleport player

- Teleport to position inside the scene with and without rotation info
- Teleport to position outside the scene (it should fail!)

## External links

- Open an external link from clicking on a cube
- Open an external link from clicking on the UI
- Open an external link via a trigger, from stepping into the scene (should fail)

## Trigger emotes

- Trigger a default emote
- Trigger a custom emote from a file in the scene

## Raycasting

- Shoot against different collision layers, including a custom layer
- Shoot a ray with hit-first and another with hit-all, ensure they return expected numbers of results
- Shoot with all four modes: local, global, global target, entity target

## Fetch player data

- Get player data for player connected with wallet
- Get player data in preview mode
- Get player data in main realm
- Get player data when in a world
- Get player data from a portable experience

## Fetch runtime data

- Same as get player data

## Get realm data

- Same as get player data

## Videos

- [ ] From local file
- [ ] From external URL
- [ ] Stop, play again
- [ ] Switch URL
- [ ] Start with lower volume
- [ ] Change volume while it plays
- [ ] Multiple screens sharing a same VideoPlayer entity
- [ ] uv mapping to only display part of the video
- [ ] transparency mask to make part of the texture transparent (eg: circular screen)
- [ ] Start video from several minutes after the start of the video

## Blockchain?

- signedFetch
- ask for signature
- make tx

## NFTShape

- Display an NFT
- Open the NFT UI
- Change the frame style

## UI

- UiDropdown
- UiTransform
- UiInput
- UiLabel
- UiBackground

## Other

- Decentraland time
- is preview
- Event listeners???

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.