Skip to content

fix: SceneBootstrapper detects and allows TestRunner launches #483

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

Merged
merged 5 commits into from
Apr 26, 2022

Conversation

fernando-cortez
Copy link
Collaborator

Description (*)

This PR unblocks TestRunner Playmode tests from executing, since SceneBootstrapper immediately launched a Playmode session into Startup scene.

SceneBootstrapper, on a playmode state change, detects if the scene loaded is a TestRunner scene and if so, does not perform any loading logic.

Remarks: EditorSceneManager.playModeStartScene was investigated as an avenue to curb this issue, as well as to simplify SceneBootstrapper. However, once EditorSceneManager.playModeStartScene is set, there is no way through editor callbacks to prevent the editor to not launch said scene in the cases of hitting the play button or when TestRunner launches a scene. Therefore, it makes sense for now to let SceneBootstrapper detect the scene launched and determine what logic to execute. A ticket has been generated to DSTP to improve this in the future.

Related Pull Requests

Issue Number(s) (*)

Fixes issue(s): MTT-2370

Manual testing scenarios

  1. Open TestRunner from the editor and launch any of the example Playmode tests.
  2. Tests will execute and return a fail or success result.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@fernando-cortez fernando-cortez added 2-Easy This PR is trivial and can be reviewed quickly 1-Needs Review PR needs attention from the assignee and reviewers labels Feb 16, 2022
@SamuelBellomo SamuelBellomo added the 2-Reviewed with Comments PR requires owner's attention label Mar 1, 2022
@SamuelBellomo SamuelBellomo added 4-On Hold PR can't proceed because it's blocked or is otherwise waiting on something. and removed 4-On Hold PR can't proceed because it's blocked or is otherwise waiting on something. labels Apr 6, 2022
@fernando-cortez fernando-cortez removed the 2-Reviewed with Comments PR requires owner's attention label Apr 19, 2022
@fernando-cortez fernando-cortez merged commit 41eec00 into develop Apr 26, 2022
@fernando-cortez fernando-cortez deleted the fix/scenebootstrapper-unblocking-test-runner branch April 26, 2022 18:13
SamuelBellomo added a commit that referenced this pull request Apr 28, 2022
* develop:
  generated files as well
  tmp commit for merge
  feat: test utilities script including Playmode test helpers (#484)
  feat: bump to pre.8 and fix compile issues [MTT-3413] (#631)
  feat: client network transform move to samples [MTT-3406] (#629)
  feat: in-game message feed [MTT-2678] [MTT-2318] (#601)
  feat: networked message channel (#605)
  Fixed Z Fighting of Floor Tiles Near Edge of Main Boss Room (#616)
  fix: SceneBootstrapper detects and allows TestRunner launches (#483)
  removed feature to set all players unready in char select when a player leaves or joins (#625)
  removed setting disconnect reason to UserRequested on clients entering post-game (#626)
  Disallowing portait orientation for auto rotation (#627)
  chore: removing QoS (#623)

# Conflicts:
#	Assets/BossRoom/Material/Characters/Character_Shadow.mat
#	Assets/BossRoom/Material/Characters/Enemy_Eyes_sheet.mat
#	Assets/BossRoom/Material/Characters/Enemy_Mouth_sheet.mat
#	Assets/BossRoom/Material/Characters/Hero_Eyes_sheet.mat
#	Assets/BossRoom/Material/Characters/Hero_Mouth_sheet.mat
#	Assets/BossRoom/Material/Characters/Toon/Hair_Mage_Girl.mat
#	Assets/BossRoom/Material/Characters/Toon/Head_Boss.mat
#	Assets/BossRoom/Material/Characters/Toon/Head_Imp.mat
#	Assets/BossRoom/Material/Characters/Toon/Head_Mage_Boy.mat
#	Assets/BossRoom/Material/Characters/Toon/Head_Mage_Girl.mat
#	Assets/BossRoom/Material/Characters/Toon/Head_Rogue_Girl.mat
#	Assets/BossRoom/Material/Characters/Toon/Head_Tank_Boy.mat
#	Assets/BossRoom/Material/Characters/Toon/Torso_Archer.mat
#	Assets/BossRoom/Material/Characters/Toon/Torso_Mage_Boy.mat
#	Assets/BossRoom/Material/Characters/Toon/Torso_Tank.mat
#	Assets/BossRoom/Material/Characters/Toon/Weapons_Archer.mat
#	Assets/BossRoom/Material/Characters/Toon/Weapons_Mage.mat
#	Assets/BossRoom/Material/Dungeon/env_spiderweb.mat
#	Assets/BossRoom/Scenes/BossRoom.unity
#	Assets/BossRoom/Scenes/CharSelect.unity
#	Assets/BossRoom/Scenes/PostGame.unity
#	Assets/BossRoom/Scenes/Startup.unity
#	Assets/BossRoom/URP/UniversalRenderPipelineAsset.asset
#	Assets/BossRoom/URP/UniversalRenderPipelineAsset_Renderer.asset
#	Assets/BossRoom/VFX/Materials/FX_Crystal.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Flame.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Flash_01.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Glow_10.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Glow_12.mat
#	Assets/BossRoom/VFX/Materials/FX_M_GroundCrack_2.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Shockwave.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Slash_01.mat
#	Assets/BossRoom/VFX/Materials/FX_M_Slash_02.mat
#	Assets/BossRoom/VFX/Materials/FX_M_StylizeSmoke_2.mat
#	Assets/BossRoom/VFX/Materials/FX_M_TargetingSphere_InRange.mat
#	Assets/BossRoom/VFX/Materials/FX_M_TargetingSphere_OutOfRange.mat
#	Assets/BossRoom/VFX/Materials/FX_M_TorchFire.mat
#	Assets/BossRoom/VFX/Materials/FX_Slash_01.mat
#	Assets/BossRoom/VFX/Materials/FX_SmokeDissolve.mat
#	Assets/BossRoom/VFX/Materials/FX_SmokeDissolve_Additive.mat
#	Assets/BossRoom/VFX/Materials/FX_Star.mat
#	Assets/BossRoom/VFX/Materials/GroundClick.mat
#	Assets/BossRoom/VFX/Materials/M_Archer_arrow.mat
#	Assets/BossRoom/VFX/Materials/M_MotionFlash.mat
#	Assets/BossRoom/VFX/Materials/TargetReticuleFriendly.mat
#	Assets/BossRoom/VFX/Materials/TargetReticuleHostile.mat
#	Assets/BossRoom/VFX/Materials/fx_mat_Chest.mat
#	Assets/BossRoom/VFX/Materials/fx_mat_GlowLine.mat
#	Assets/BossRoom/VFX/Materials/fx_mat_GlowLine_2.mat
#	Assets/BossRoom/VFX/Materials/spawndoor.mat
#	Assets/UniversalRenderPipelineGlobalSettings.asset.meta
#	Packages/manifest.json
#	Packages/packages-lock.json
#	ProjectSettings/GraphicsSettings.asset
#	ProjectSettings/ProjectSettings.asset
#	ProjectSettings/ProjectVersion.txt
SamuelBellomo added a commit that referenced this pull request Apr 28, 2022
…fooding

* feature/bump-2021:
  material update
  update with right package lock
  generated files as well
  tmp commit for merge
  feat: test utilities script including Playmode test helpers (#484)
  feat: bump to pre.8 and fix compile issues [MTT-3413] (#631)
  feat: client network transform move to samples [MTT-3406] (#629)
  feat: in-game message feed [MTT-2678] [MTT-2318] (#601)
  feat: networked message channel (#605)
  Fixed Z Fighting of Floor Tiles Near Edge of Main Boss Room (#616)
  fix: SceneBootstrapper detects and allows TestRunner launches (#483)
  removed feature to set all players unready in char select when a player leaves or joins (#625)
  removed setting disconnect reason to UserRequested on clients entering post-game (#626)
  Disallowing portait orientation for auto rotation (#627)
  chore: removing QoS (#623)

# Conflicts:
#	Assets/BossRoom/Scenes/Startup.unity
#	Packages/manifest.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-Needs Review PR needs attention from the assignee and reviewers 2-Easy This PR is trivial and can be reviewed quickly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants