Skip to content

Commit 91981aa

Browse files
Try and run PreTestSetup for TAEF CI succes
1 parent cf9f27b commit 91981aa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

UITests/UITests.Tests.Shared/UITestBase.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public static TestSetupHelper.TestSetupHelperOptions TestSetupHelperOptions
8787
[TestInitialize]
8888
public async Task TestInitialize()
8989
{
90+
PreTestSetup();
91+
9092
#if USING_TAEF
9193
var fullTestName = TestContext.TestName;
9294
var lastDotIndex = fullTestName.LastIndexOf('.');
@@ -207,5 +209,16 @@ private void CommunicationService_RequestReceived(AppServiceConnection sender, A
207209
messageDeferral.Complete();
208210
}
209211
}
212+
213+
// This will reset the test for each run (as from original WinUI https://github.com/microsoft/microsoft-ui-xaml/blob/master/test/testinfra/MUXTestInfra/Infra/TestHelpers.cs)
214+
// We construct it so it doesn't try to run any tests since we use the AppService Bridge to complete
215+
// our loading.
216+
private void PreTestSetup()
217+
{
218+
_ = new TestSetupHelper(new string[] { }, new TestSetupHelper.TestSetupHelperOptions()
219+
{
220+
AutomationIdOfSafeItemToClick = null
221+
});
222+
}
210223
}
211224
}

0 commit comments

Comments
 (0)