/// <summary> /// Verifies that the Preview Changes dialog is showing with the /// specified title. The dialog does not have an AutomationId and the /// title can be changed by features, so callers of this method must /// specify a title. /// </summary> /// <param name="expectedTitle"></param> public async Task VerifyOpenAsync(string expectedTitle, CancellationToken cancellationToken) { await DialogHelpers.FindDialogByNameAsync(JoinableTaskFactory, await TestServices.Shell.GetMainWindowAsync(cancellationToken), expectedTitle, isOpen : true, cancellationToken); // Wait for application idle to ensure the dialog is fully initialized await WaitForApplicationIdleAsync(cancellationToken); }
public async Task VerifyClosedAsync(string expectedTitle, CancellationToken cancellationToken) => await DialogHelpers.FindDialogByNameAsync(JoinableTaskFactory, await TestServices.Shell.GetMainWindowAsync(cancellationToken), expectedTitle, isOpen : false, cancellationToken);