Merge branch 'master' of https://github.com/James-Sangalli/alpha-wallet-ios into base64SafeEncoding

pull/250/head
James Sangalli 7 years ago
commit 13477fbf33
  1. 12
      Trust.xcodeproj/project.pbxproj
  2. 1
      Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift
  3. 19
      TrustTests/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewControllerTests.swift

@ -371,6 +371,7 @@
5E7C7E4B4054AAD41C5BE3EC /* SettingsAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7564AF453BAB0BDAAA57 /* SettingsAction.swift */; }; 5E7C7E4B4054AAD41C5BE3EC /* SettingsAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7564AF453BAB0BDAAA57 /* SettingsAction.swift */; };
5E7C7E5C30EFDC70DF1E00C1 /* TicketsViewControllerHeaderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C77316522DF2B256F1F92 /* TicketsViewControllerHeaderViewModel.swift */; }; 5E7C7E5C30EFDC70DF1E00C1 /* TicketsViewControllerHeaderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C77316522DF2B256F1F92 /* TicketsViewControllerHeaderViewModel.swift */; };
5E7C7EAEBB435F3909DA36FB /* TransferTicketsViaWalletAddressViewControllerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C76D3CFA12C2236E73E10 /* TransferTicketsViaWalletAddressViewControllerViewModel.swift */; }; 5E7C7EAEBB435F3909DA36FB /* TransferTicketsViaWalletAddressViewControllerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C76D3CFA12C2236E73E10 /* TransferTicketsViaWalletAddressViewControllerViewModel.swift */; };
5E7C7EAED92E4AE8B99217AB /* TransferTicketsQuantitySelectionViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7021EE19C4B81CAAF3C0 /* TransferTicketsQuantitySelectionViewControllerTests.swift */; };
5E7C7EEE563D81793CB96FA0 /* TransferTicketsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C755132D9B6F95080A1BE /* TransferTicketsCoordinator.swift */; }; 5E7C7EEE563D81793CB96FA0 /* TransferTicketsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C755132D9B6F95080A1BE /* TransferTicketsCoordinator.swift */; };
5E7C7FAF2A07E7AE21BF09AF /* AlphaWalletSettingsTextRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C71684B93F60206992E10 /* AlphaWalletSettingsTextRow.swift */; }; 5E7C7FAF2A07E7AE21BF09AF /* AlphaWalletSettingsTextRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C71684B93F60206992E10 /* AlphaWalletSettingsTextRow.swift */; };
5E7C7FC0770A411DB09F8C09 /* TokenViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7C077372C3F2A4349FA1 /* TokenViewCell.swift */; }; 5E7C7FC0770A411DB09F8C09 /* TokenViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7C077372C3F2A4349FA1 /* TokenViewCell.swift */; };
@ -800,6 +801,7 @@
5E7C70088832B2D161EB4AAB /* SendViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendViewController.swift; sourceTree = "<group>"; }; 5E7C70088832B2D161EB4AAB /* SendViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendViewController.swift; sourceTree = "<group>"; };
5E7C700CD3E43689E88FBE9B /* SetSellTicketsExpiryDateViewControllerViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetSellTicketsExpiryDateViewControllerViewModel.swift; sourceTree = "<group>"; }; 5E7C700CD3E43689E88FBE9B /* SetSellTicketsExpiryDateViewControllerViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetSellTicketsExpiryDateViewControllerViewModel.swift; sourceTree = "<group>"; };
5E7C7011D8E5C9FFE0E59D55 /* TransferTicketsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferTicketsViewController.swift; sourceTree = "<group>"; }; 5E7C7011D8E5C9FFE0E59D55 /* TransferTicketsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferTicketsViewController.swift; sourceTree = "<group>"; };
5E7C7021EE19C4B81CAAF3C0 /* TransferTicketsQuantitySelectionViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferTicketsQuantitySelectionViewControllerTests.swift; sourceTree = "<group>"; };
5E7C703BA1D0E9ACB7399155 /* TransferTicketsQuantitySelectionViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferTicketsQuantitySelectionViewModel.swift; sourceTree = "<group>"; }; 5E7C703BA1D0E9ACB7399155 /* TransferTicketsQuantitySelectionViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferTicketsQuantitySelectionViewModel.swift; sourceTree = "<group>"; };
5E7C70CC85B337061151724E /* ImportWalletHelpBubbleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImportWalletHelpBubbleView.swift; sourceTree = "<group>"; }; 5E7C70CC85B337061151724E /* ImportWalletHelpBubbleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImportWalletHelpBubbleView.swift; sourceTree = "<group>"; };
5E7C70FB40612BB02594EC00 /* ChooseTicketTransferModeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChooseTicketTransferModeViewController.swift; sourceTree = "<group>"; }; 5E7C70FB40612BB02594EC00 /* ChooseTicketTransferModeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChooseTicketTransferModeViewController.swift; sourceTree = "<group>"; };
@ -1820,6 +1822,7 @@
29BDF1991FEE50B60023A45F /* Types */, 29BDF1991FEE50B60023A45F /* Types */,
29BDF1921FEE437E0023A45F /* Controllers */, 29BDF1921FEE437E0023A45F /* Controllers */,
299B5E361FCBCDE90051361C /* ViewModels */, 299B5E361FCBCDE90051361C /* ViewModels */,
5E7C7DB8A228007C94CF94AF /* ViewControllers */,
); );
path = Transfer; path = Transfer;
sourceTree = "<group>"; sourceTree = "<group>";
@ -2427,6 +2430,14 @@
path = Helpers; path = Helpers;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
5E7C7DB8A228007C94CF94AF /* ViewControllers */ = {
isa = PBXGroup;
children = (
5E7C7021EE19C4B81CAAF3C0 /* TransferTicketsQuantitySelectionViewControllerTests.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
};
5E7C7F64537949FBD3F77457 /* Views */ = { 5E7C7F64537949FBD3F77457 /* Views */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -3696,6 +3707,7 @@
76F1D850F4F2E968CF8D9C86 /* MonkeyTest.swift in Sources */, 76F1D850F4F2E968CF8D9C86 /* MonkeyTest.swift in Sources */,
5E7C786AD8E4877C36D3B14A /* TicketAdaptorTest.swift in Sources */, 5E7C786AD8E4877C36D3B14A /* TicketAdaptorTest.swift in Sources */,
5E7C7CCA357CB7BF12E1F2B4 /* UIStackView+Array.swift in Sources */, 5E7C7CCA357CB7BF12E1F2B4 /* UIStackView+Array.swift in Sources */,
5E7C7EAED92E4AE8B99217AB /* TransferTicketsQuantitySelectionViewControllerTests.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

@ -53,6 +53,7 @@ class TransferTicketsQuantitySelectionViewController: UIViewController {
quantityStepper, quantityStepper,
].asStackView(axis: .vertical, alignment: .center) ].asStackView(axis: .vertical, alignment: .center)
stackView.translatesAutoresizingMaskIntoConstraints = false stackView.translatesAutoresizingMaskIntoConstraints = false
roundedBackground.addSubview(stackView)
let buttonsStackView = [nextButton].asStackView(distribution: .fillEqually, contentHuggingPriority: .required) let buttonsStackView = [nextButton].asStackView(distribution: .fillEqually, contentHuggingPriority: .required)
buttonsStackView.translatesAutoresizingMaskIntoConstraints = false buttonsStackView.translatesAutoresizingMaskIntoConstraints = false

@ -0,0 +1,19 @@
// Copyright © 2018 Stormbird PTE. LTD.
import XCTest
@testable import Trust
import UIKit
class TransferTicketsQuantitySelectionViewControllerTests: XCTestCase {
func testTransferTicketQuantitySelectionViewControllerCanBeCreated() {
let token = TokenObject()
let type = PaymentFlow.send(type: .stormBird(token))
let ticket = Ticket(id: "1", index: 1, city: "", name: "", venue: "", match: 1, date: Date(), seatId: 1, category: 1, countryA: "", countryB: "")
let ticketHolder = TicketHolder(tickets: [ticket], status: .available)
let controller = TransferTicketsQuantitySelectionViewController(paymentFlow: type)
let viewModel = TransferTicketsQuantitySelectionViewModel(ticketHolder: ticketHolder)
controller.configure(viewModel: viewModel)
XCTAssertNoThrow(controller.view)
}
}
Loading…
Cancel
Save