From f13230801d7a38308a597102673cfc52d87cbfaf Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Fri, 21 Aug 2026 20:03:34 +0100 Subject: [PATCH 1/2] Fix Windows support upload navigation --- .../ViewModelTests/Support/SupportPageViewModelTests.cs | 6 ++++-- .../ViewModels/Support/SupportPageViewModel.cs | 3 +-- TransactionProcessor.Mobile.UITests/Steps/ToolbarSteps.cs | 6 ------ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs b/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs index fa8ba7e6..ac5de641 100644 --- a/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs +++ b/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs @@ -51,12 +51,14 @@ public SupportPageViewModelTests() { } [Fact] - public void SupportPageViewModel_UploadLogsCommand_Execute_IsExecuted() + public async Task SupportPageViewModel_UploadLogsCommand_Execute_IsExecuted() { this.Mediator.Setup(m => m.Send(It.IsAny(), It.IsAny())).ReturnsAsync(Result.Success()); - this.ViewModel.UploadLogsCommand.Execute(null); + await this.ViewModel.UploadLogsCommand.ExecuteAsync(null); this.Mediator.Verify(m => m.Send(It.IsAny(),It.IsAny()),Times.Once); + this.DialogService.Verify(d => d.ShowInformationToast("Logs have been uploaded successfully."), Times.Once); + this.NavigationService.Verify(n => n.GoBack(), Times.Never); } [Fact] diff --git a/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs b/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs index aee7a714..ebd237f7 100644 --- a/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs +++ b/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs @@ -75,7 +75,6 @@ private async Task UploadLogs() { if (result.IsSuccess) { await this.DialogService.ShowInformationToast("Logs have been uploaded successfully."); - await this.NavigationService.GoBack(); } else { await this.DialogService.ShowWarningToast("Failed to upload logs."); } @@ -90,4 +89,4 @@ private async Task ViewLogs() { #endregion } -} \ No newline at end of file +} diff --git a/TransactionProcessor.Mobile.UITests/Steps/ToolbarSteps.cs b/TransactionProcessor.Mobile.UITests/Steps/ToolbarSteps.cs index fd9416be..0b006e17 100644 --- a/TransactionProcessor.Mobile.UITests/Steps/ToolbarSteps.cs +++ b/TransactionProcessor.Mobile.UITests/Steps/ToolbarSteps.cs @@ -58,12 +58,6 @@ public async Task ThenTheSupportPageIsDisplayed(){ [When(@"I tap on the Upload Logs Button")] public async Task WhenITapOnTheUploadLogsButton() { - if (TransactionProcessor.Mobile.UITests.Drivers.AppiumDriverWrapper.MobileTestPlatform == TransactionProcessor.Mobile.UITests.Drivers.MobileTestPlatform.Windows) - { - Console.WriteLine("Skipping Upload Logs interaction on Windows until the application navigation crash is fixed."); - return; - } - await this.supportPage.ClickUploadLogsButton(); } From c5bfde2466f7343a7a110f1780481ff480bca6b6 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Sat, 22 Aug 2026 07:37:46 +0100 Subject: [PATCH 2/2] Isolate Windows upload notice --- .../Support/SupportPageViewModelTests.cs | 2 +- .../UIServices/IDialogService.cs | 2 ++ .../Support/SupportPageViewModel.cs | 2 +- .../UIServices/DialogService.cs | 23 +++++++++++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs b/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs index ac5de641..bf2c9807 100644 --- a/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs +++ b/TransactionProcessor.Mobile.BusinessLogic.Tests/ViewModelTests/Support/SupportPageViewModelTests.cs @@ -57,7 +57,7 @@ public async Task SupportPageViewModel_UploadLogsCommand_Execute_IsExecuted() await this.ViewModel.UploadLogsCommand.ExecuteAsync(null); this.Mediator.Verify(m => m.Send(It.IsAny(),It.IsAny()),Times.Once); - this.DialogService.Verify(d => d.ShowInformationToast("Logs have been uploaded successfully."), Times.Once); + this.DialogService.Verify(d => d.ShowUploadLogsCompleteNotice(), Times.Once); this.NavigationService.Verify(n => n.GoBack(), Times.Never); } diff --git a/TransactionProcessor.Mobile.BusinessLogic/UIServices/IDialogService.cs b/TransactionProcessor.Mobile.BusinessLogic/UIServices/IDialogService.cs index bffb0390..6c77ce02 100644 --- a/TransactionProcessor.Mobile.BusinessLogic/UIServices/IDialogService.cs +++ b/TransactionProcessor.Mobile.BusinessLogic/UIServices/IDialogService.cs @@ -26,6 +26,8 @@ Task ShowInformationToast(String message, TimeSpan? duration = null, CancellationToken cancellationToken = default); + Task ShowUploadLogsCompleteNotice(); + Task ShowSuccessToast(String message, Action? action = null, String? actionButtonText = "OK", diff --git a/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs b/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs index ebd237f7..7d680378 100644 --- a/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs +++ b/TransactionProcessor.Mobile.BusinessLogic/ViewModels/Support/SupportPageViewModel.cs @@ -74,7 +74,7 @@ private async Task UploadLogs() { var result = await this.Mediator.Send(command, CancellationToken.None); if (result.IsSuccess) { - await this.DialogService.ShowInformationToast("Logs have been uploaded successfully."); + await this.DialogService.ShowUploadLogsCompleteNotice(); } else { await this.DialogService.ShowWarningToast("Failed to upload logs."); } diff --git a/TransactionProcessor.Mobile/UIServices/DialogService.cs b/TransactionProcessor.Mobile/UIServices/DialogService.cs index 234c2e27..4703df32 100644 --- a/TransactionProcessor.Mobile/UIServices/DialogService.cs +++ b/TransactionProcessor.Mobile/UIServices/DialogService.cs @@ -45,8 +45,27 @@ await Application.Current.MainPage.DisplaySnackbar(message, action, actionButtonText, duration, - SnackBarOptionsHelper.GetInfoSnackbarOptions, - cancellationToken); + SnackBarOptionsHelper.GetInfoSnackbarOptions, + cancellationToken); + } + + public async Task ShowUploadLogsCompleteNotice() + { + if (OperatingSystem.IsWindows()) + { + await Application.Current.MainPage.DisplayAlert( + "Logs uploaded", + "Logs have been uploaded successfully.", + "OK"); + return; + } + + await Application.Current.MainPage.DisplaySnackbar( + "Logs have been uploaded successfully.", + null, + "OK", + null, + SnackBarOptionsHelper.GetSuccessSnackbarOptions); } public async Task ShowSuccessToast(String message,