Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Jun 14, 2023
1 parent 60c1f6c commit c8d54a9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Tests/Runtime/Attributes/FocusGameViewAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
namespace TestHelper.Attributes
{
[TestFixture]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
[IgnoreBatchMode("Open GameView in batch mode but can not be focused.")]
public class FocusGameViewAttributeTest
{
[Test]
[FocusGameView]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
[IgnoreBatchMode("Open GameView in batchmode but can not be focused.")]
public void Attach_GameViewHasFocus()
{
const string GameView = "UnityEditor.GameView";
Expand All @@ -26,5 +26,13 @@ public void Attach_GameViewHasFocus()
Assert.That(focusedWindow.GetType().FullName, Is.EqualTo(GameView).Or.EqualTo(SimulatorWindow));
#endif
}

[Test]
[FocusGameView]
[IgnoreWindowMode("For batchmode test.")]
public void Attach_KeepBatchmode()
{
Assert.That(Application.isBatchMode, Is.True);
}
}
}

0 comments on commit c8d54a9

Please sign in to comment.