Fix test suite #2608

pull/2616/head
Vladyslav shepitko 4 years ago
parent 8f2f2f30c9
commit 41d1987a36
  1. 5
      AlphaWallet/Wallet/ViewControllers/SeedPhraseBackupIntroductionViewController.swift
  2. 3
      AlphaWalletTests/Coordinators/TokensCoordinatorTests.swift
  3. 3
      AlphaWalletTests/Tokens/Helpers/SmartContractHelperTests.swift
  4. 4
      AlphaWalletTests/Tokens/Helpers/TokenAdaptorTest.swift
  5. 2
      AlphaWalletTests/ViewControllers/SeedPhraseBackupIntroductionViewControllerTests.swift

@ -13,8 +13,9 @@ class SeedPhraseBackupIntroductionViewController: UIViewController {
private let roundedBackground = RoundedBackground() private let roundedBackground = RoundedBackground()
private let subtitleLabel = UILabel() private let subtitleLabel = UILabel()
private let imageView = UIImageView() private let imageView = UIImageView()
private let descriptionLabel1 = UILabel() //NOTE: internal level, for test cases
private let buttonsBar = ButtonsBar(configuration: .green(buttons: 1)) let descriptionLabel1 = UILabel()
let buttonsBar = ButtonsBar(configuration: .green(buttons: 1))
private var imageViewDimension: CGFloat { private var imageViewDimension: CGFloat {
return ScreenChecker.size(big: 250, medium: 180, small: 180) return ScreenChecker.size(big: 250, medium: 180, small: 180)

@ -37,7 +37,8 @@ class TokensCoordinatorTests: XCTestCase {
filterTokensCoordinator: FilterTokensCoordinator(assetDefinitionStore: assetDefinitionStore, tokenActionsService: tokenActionsService), filterTokensCoordinator: FilterTokensCoordinator(assetDefinitionStore: assetDefinitionStore, tokenActionsService: tokenActionsService),
analyticsCoordinator: FakeAnalyticsService(), analyticsCoordinator: FakeAnalyticsService(),
tokenActionsService: tokenActionsService, tokenActionsService: tokenActionsService,
walletConnectCoordinator: .fake() walletConnectCoordinator: .fake(),
transactionsStorages: .init()
) )
coordinator.start() coordinator.start()

File diff suppressed because one or more lines are too long

@ -42,7 +42,7 @@ class TokenAdaptorTest: XCTestCase {
] ]
let assetDefinitionStore = AssetDefinitionStore() let assetDefinitionStore = AssetDefinitionStore()
let token = TokenObject() let token = TokenObject()
token.contractAddress = Constants.nullAddress token.contract = Constants.nullAddress.eip55String
let bundles = TokenAdaptor(token: token, assetDefinitionStore: assetDefinitionStore, eventsDataStore: FakeEventsDataStore()).bundle(tokens: tokens) let bundles = TokenAdaptor(token: token, assetDefinitionStore: assetDefinitionStore, eventsDataStore: FakeEventsDataStore()).bundle(tokens: tokens)
XCTAssertEqual(bundles.count, 2) XCTAssertEqual(bundles.count, 2)
} }
@ -93,7 +93,7 @@ class TokenAdaptorTest: XCTestCase {
] ]
let assetDefinitionStore = AssetDefinitionStore() let assetDefinitionStore = AssetDefinitionStore()
let token = TokenObject() let token = TokenObject()
token.contractAddress = Constants.nullAddress token.contract = Constants.nullAddress.eip55String
let bundles = TokenAdaptor(token: token, assetDefinitionStore: assetDefinitionStore, eventsDataStore: FakeEventsDataStore()).bundle(tokens: tokens) let bundles = TokenAdaptor(token: token, assetDefinitionStore: assetDefinitionStore, eventsDataStore: FakeEventsDataStore()).bundle(tokens: tokens)
XCTAssertEqual(bundles.count, 2) XCTAssertEqual(bundles.count, 2)
} }

@ -15,7 +15,7 @@ class SeedPhraseBackupIntroductionViewControllerTests: XCTestCase {
controller.configure() controller.configure()
controller.view.layoutIfNeeded() controller.view.layoutIfNeeded()
XCTAssertFalse(controller.descriptionLabel2.overlaps(other: controller.buttonsBar, in: controller)) XCTAssertFalse(controller.descriptionLabel1.overlaps(other: controller.buttonsBar, in: controller))
} }
} }

Loading…
Cancel
Save