Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
moomiji committed Aug 8, 2024
1 parent bbed24c commit f91f26f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
test:
strategy:
matrix:
API_LEVEL: [ 23,22,21,19,18 ]
API_LEVEL: [ 25,24,23,22,21,19,18 ]
fail-fast: false
runs-on: macos-13
env:
Expand Down
13 changes: 8 additions & 5 deletions src/MaaFramework.Binding.UnitTests/Test_IMaaController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ public class Test_IMaaController
[ClassInitialize]
public static void InitializeClass(TestContext context)
{
#if !GITHUB_ACTIONS
InitializeData(AdbControllerTypes.InputPresetMaaTouch);
#endif
MaaTouchData = Data;
#if !GITHUB_ACTIONS
InitializeData(AdbControllerTypes.InputPresetMiniTouch);
Expand Down Expand Up @@ -203,7 +201,11 @@ public void Interface_PressKey(MaaTypes type, IMaaController maaController, bool
}

[TestMethod]
#if GITHUB_ACTIONS
[MaaData(MaaTypes.All, nameof(Data), false, "")]
#else
[MaaData(MaaTypes.All, nameof(Data), true, "")]
#endif
[MaaData(MaaTypes.All, nameof(Data), true, "Anything")]
public void Interface_InputText(MaaTypes type, IMaaController maaController, bool assertSuccess, string text)
{
Expand All @@ -214,15 +216,16 @@ public void Interface_InputText(MaaTypes type, IMaaController maaController, boo
}

[TestMethod]
#if GITHUB_ACTIONS
[MaaData(MaaTypes.All, nameof(Data), true, "com.android.settings")]
#else
[MaaData(MaaTypes.All, nameof(Data), false, "com.android.settings")]
#endif
[MaaData(MaaTypes.All, nameof(Data), true, "com.android.settings/.Settings")]
public void Interface_StartApp_StopApp(MaaTypes type, IMaaController maaController, bool assertSuccess, string intent)
{
Assert.IsNotNull(maaController);
Assert.IsNotNull(intent);
#if GITHUB_ACTIONS
assertSuccess = true;
#endif

var job = maaController.StartApp(intent);
Interface_IMaaPost(assertSuccess, job);
Expand Down

0 comments on commit f91f26f

Please sign in to comment.