Skip to content

Commit aafded5

Browse files
removal of unnecessary method
1 parent 4509df0 commit aafded5

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

Packages/com.unity.multiplayer.samples.coop/Utilities/Testing/TestUtilities.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,14 @@
22
using UnityEngine;
33
using NUnit.Framework;
44
using Unity.Netcode;
5-
using UnityEngine.EventSystems;
65
using UnityEngine.SceneManagement;
7-
using UnityEngine.UI;
86

97
namespace Unity.Multiplayer.Samples.Utilities
108
{
119
public abstract class TestUtilities
1210
{
1311
const float k_MaxSceneLoadDuration = 10f;
1412

15-
/// <summary>
16-
/// Finds an active Button GameObject by name. If Button component is present on GameObject, it will be clicked.
17-
/// </summary>
18-
/// <param name="name"> Name of Button GameObject </param>
19-
public static void ClickButtonByName(string name)
20-
{
21-
var buttonGameObject = GameObject.Find(name);
22-
23-
Assert.IsNotNull(buttonGameObject,
24-
$"Button GameObject with name {name} not found in scene!");
25-
26-
EventSystem.current.SetSelectedGameObject(buttonGameObject);
27-
28-
var buttonComponent = buttonGameObject.GetComponent<Button>();
29-
30-
Assert.IsNotNull(buttonComponent, $"Button component not found on {buttonGameObject.name}!");
31-
32-
buttonComponent.onClick.Invoke();
33-
}
34-
3513
/// <summary>
3614
/// Helper wrapper method for asserting the completion of a scene load to be used inside Playmode tests. A scene
3715
/// is either loaded successfully, or the loading process has timed out.

0 commit comments

Comments
 (0)