using XFEWorkflow.Views; namespace XFEWorkflow.Services; internal static partial class UiSmokeTest { private static async Task SmokeTypedValuesAsync(string output) { var directory = new DirectoryInfo(AppContext.BaseDirectory); while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "XFEWorkflow.slnx"))) directory = directory.Parent; var services = AppServices.Current; var workflow = await services.Workflows.ImportAsync(Path.Combine(directory!.FullName, "samples/workflows/wecom-three-contacts-array-auto-reply.xfeworkflow")); var navigation = AppShellPage.Current!.ViewModel.NavigationViewService; navigation.NavigateTo(); await WaitManagementAsync(() => WorkflowEditorPage.Current?.IsLoaded == true); var editor = await WorkflowEditorPage.Current!.OpenAsync(workflow.Id); try { await editor.SmokeTypedValuesAsync(output); } finally { await WorkflowEditorPage.CloseOpenAsync(workflow.Id); navigation.NavigateTo(); } } }