From 62dfd6aa289e84e82fa204a300efefb9171100df Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Wed, 15 Mar 2023 18:34:06 +0000 Subject: [PATCH] Ready for PR (i think!) --- .../TransactionRequestHandler.cs | 26 ++-- .../Common/DockerHelper.cs | 2 +- .../Features/EndToEndTests.feature | 37 +++-- .../Features/EndToEndTests.feature.cs | 133 ++++++++++++++---- ...ansactionsSelectMobileTopupOperatorPage.cs | 101 ++++++++++++- .../Steps/SharedSteps.cs | 48 +++++++ .../Steps/TransactionsSteps.cs | 59 +++++++- .../Pages/Support/SupportPage.xaml | 2 +- .../Pages/Support/ViewLogsPage.xaml | 2 +- .../Pages/Transactions/Admin/AdminPage.xaml | 2 +- .../BillPayment/BillPaymentFailedPage.xaml | 2 +- .../BillPaymentGetAccountPage.xaml | 2 +- .../BillPayment/BillPaymentPayBillPage.xaml | 2 +- .../BillPaymentSelectOperatorPage.xaml | 2 +- .../BillPaymentSelectProductPage.xaml | 2 +- .../BillPayment/BillPaymentSuccessPage.xaml | 2 +- .../MobileTopup/MobileTopupFailedPage.xaml | 2 +- .../MobileTopupPerformTopupPage.xaml | 2 +- .../MobileTopupSelectProductPage.xaml | 2 +- .../MobileTopup/MobileTopupSuccessPage.xaml | 2 +- .../Voucher/VoucherIssueFailedPage.xaml | 2 +- .../Voucher/VoucherIssueSuccessPage.xaml | 2 +- .../Voucher/VoucherPerformIssuePage.xaml | 2 +- .../Voucher/VoucherSelectOperatorPage.xaml | 2 +- .../Voucher/VoucherSelectProductPage.xaml | 2 +- 25 files changed, 367 insertions(+), 75 deletions(-) diff --git a/TransactionMobile.Maui.BusinessLogic/RequestHandlers/TransactionRequestHandler.cs b/TransactionMobile.Maui.BusinessLogic/RequestHandlers/TransactionRequestHandler.cs index 0c07b9414..4077a16d7 100644 --- a/TransactionMobile.Maui.BusinessLogic/RequestHandlers/TransactionRequestHandler.cs +++ b/TransactionMobile.Maui.BusinessLogic/RequestHandlers/TransactionRequestHandler.cs @@ -60,18 +60,18 @@ public async Task> Handle(PerformMobileT ITransactionService transactionService = this.TransactionServiceResolver(useTrainingMode); // TODO: Factory - PerformMobileTopupRequestModel model = new() { - ContractId = request.ContractId, - CustomerAccountNumber = request.CustomerAccountNumber, - CustomerEmailAddress = request.CustomerEmailAddress, - OperatorIdentifier = request.OperatorIdentifier, - ProductId = request.ProductId, - TopupAmount = request.TopupAmount, - TransactionDateTime = request.TransactionDateTime, - TransactionNumber = transaction.transactionNumber.ToString(), - DeviceIdentifier = String.Empty, - ApplicationVersion = this.ApplicationInfoService.VersionString - }; + PerformMobileTopupRequestModel model = new(){ + ContractId = request.ContractId, + CustomerAccountNumber = request.CustomerAccountNumber, + CustomerEmailAddress = request.CustomerEmailAddress, + OperatorIdentifier = request.OperatorIdentifier, + ProductId = request.ProductId, + TopupAmount = request.TopupAmount, + TransactionDateTime = request.TransactionDateTime, + TransactionNumber = transaction.transactionNumber.ToString(), + DeviceIdentifier = this.DeviceService.GetIdentifier(), + ApplicationVersion = this.ApplicationInfoService.VersionString + }; Result result = await transactionService.PerformMobileTopup(model, cancellationToken); @@ -90,7 +90,7 @@ public async Task> Handle(PerformMobileT private async Task<(Int64 transactionNumber, TransactionRecord transactionRecord)> CreateTransactionRecord(TransactionRecord transactionRecord) { transactionRecord.ApplicationVersion = this.ApplicationInfoService.VersionString; - transactionRecord.DeviceIdentifier = String.Empty; + transactionRecord.DeviceIdentifier = this.DeviceService.GetIdentifier(); Int64 transactionNumber = await this.DatabaseContext.CreateTransaction(transactionRecord); return (transactionNumber, transactionRecord); diff --git a/TransactionMobile.Maui.UiTests/Common/DockerHelper.cs b/TransactionMobile.Maui.UiTests/Common/DockerHelper.cs index e921ad5c6..f2c58c1a2 100644 --- a/TransactionMobile.Maui.UiTests/Common/DockerHelper.cs +++ b/TransactionMobile.Maui.UiTests/Common/DockerHelper.cs @@ -202,7 +202,7 @@ public async Task SetupConfigHostContainer(List