Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ public async Task<Result<PerformMobileTopupResponseModel>> 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<PerformMobileTopupResponseModel> result = await transactionService.PerformMobileTopup(model, cancellationToken);

Expand All @@ -90,7 +90,7 @@ public async Task<Result<PerformMobileTopupResponseModel>> 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);
Expand Down
2 changes: 1 addition & 1 deletion TransactionMobile.Maui.UiTests/Common/DockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public async Task<IContainerService> SetupConfigHostContainer(List<INetworkServi

String imageName = "stuartferguson/mobileconfiguration:latest";

if (FdOs.IsWindows()){
if (FdOs.IsWindows() && Shared.IntegrationTesting.DockerHelper.GetDockerEnginePlatform() == DockerEnginePlatform.Windows){
imageName = "stuartferguson/mobileconfigurationwindows:latest";
}

Expand Down
37 changes: 27 additions & 10 deletions TransactionMobile.Maui.UiTests/Features/EndToEndTests.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@background @login @toolbar @profile @base @sharedapp @shared
@background @login @toolbar @profile @base @sharedapp @shared @transactions
Feature: EndToEndTests

Background:
Expand Down Expand Up @@ -70,6 +70,10 @@ Background:
| EmailAddress | Password | GivenName | FamilyName | EstateName | MerchantName |
| merchantuser@testmerchant1.co.uk | 123456 | TestMerchant | User1 | Test Estate 1 | Test Merchant 1 |

Given I make the following manual merchant deposits
| Reference | Amount | DateTime | MerchantName | EstateName |
| Deposit1 | 100.00 | Today | Test Merchant 1 | Test Estate 1 |

Given I have created a config for my application

Given I have created a config for my device
Expand All @@ -91,19 +95,32 @@ Scenario: EndToEnd
| test address line 1 | TestTown |
When I click on the back button
Then the My Profile Page is displayed
#When I tap on the Contacts button
#Then the Contact List Page is displayed
#And the Primary Contact is displayed
#| Name | EmailAddress | MobileNumber |
#| Test Contact | stuart_ferguson1@outlook.com | 123456789 |
#When I click on the back button
#Then the My Profile Page is displayed
When I tap on the Account Info button
Then the Account Info Page is displayed
And the Account Info is displayed
| Name | Balance | AvailableBalance |
| Test Merchant 1 | 0 | 0 |
When I click on the back button
Then the My Profile Page is displayed
When I tap on Logout
Then the Login Screen is displayed
When I click on the back button
Then the Merchant Home Page is displayed
When I tap on Transactions
Then the Transaction Page is displayed
When I tap on the Mobile Topup button
Then the Transaction Select Mobile Topup Operator Page is displayed
When I tap on the 'Safaricom' button
Then the Select Product Page is displayed
When I tap on the 'Custom' product button
Then the Enter Topup Details Page is displayed
When I enter '07777777775' as the Customer Mobile Number
And I enter 10.00 as the Topup Amount
And I tap on Perform Topup
Then the Mobile Topup Successful Page is displayed
And I tap on Complete
Then the Transaction Page is displayed
When I click on the back button
Then the Merchant Home Page is displayed
When I click on the back button
Then A message is displayed confirming I want to log out
When I click yes
Then the Login Page is displayed
133 changes: 105 additions & 28 deletions TransactionMobile.Maui.UiTests/Features/EndToEndTests.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading