| | 1 | | using System.Collections; |
| | 2 | | using UnityEngine; |
| | 3 | | using DCL; |
| | 4 | | using DCL.Helpers; |
| | 5 | |
|
| | 6 | | public class VisualTestsBase : IntegrationTestSuite_Legacy |
| | 7 | | { |
| 6 | 8 | | protected override string TEST_SCENE_NAME => "MainVisualTest"; |
| 0 | 9 | | protected override bool enableSceneIntegrityChecker => false; |
| | 10 | |
|
| 6 | 11 | | protected override IEnumerator SetUp() { yield break; } |
| | 12 | |
|
| | 13 | | public IEnumerator InitVisualTestsScene(string testName) |
| | 14 | | { |
| 0 | 15 | | yield return InitScene(); |
| 0 | 16 | | yield return null; |
| | 17 | |
|
| | 18 | | //TODO(Brian): This is to wait for SceneController.Awake(). We should remove this |
| | 19 | | // When the entry point is refactored. |
| 0 | 20 | | RenderProfileManifest.i.Initialize(RenderProfileManifest.i.testProfile); |
| | 21 | |
|
| 0 | 22 | | Environment.i.world.sceneBoundsChecker.Stop(); |
| 0 | 23 | | Environment.i.world.blockersController.SetEnabled(false); |
| | 24 | |
|
| 0 | 25 | | base.SetUp_Renderer(); |
| | 26 | |
|
| 0 | 27 | | VisualTestHelpers.currentTestName = testName; |
| 0 | 28 | | VisualTestHelpers.snapshotIndex = 0; |
| | 29 | |
|
| 0 | 30 | | DCLCharacterController.i.PauseGravity(); |
| 0 | 31 | | DCLCharacterController.i.enabled = false; |
| | 32 | |
|
| | 33 | | // Position character inside parcel (0,0) |
| 0 | 34 | | TestHelpers.SetCharacterPosition(new Vector3(0, 2f, 0f)); |
| | 35 | |
|
| 0 | 36 | | yield return null; |
| 0 | 37 | | } |
| | 38 | | } |