This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // BestOffersViewController.swift | |
| // finance | |
| // | |
| // Created by David Yanez on 4/2/18. | |
| // Copyright © 2018 creditsesame. All rights reserved. | |
| // | |
| import UIKit | |
| import SnapKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| topView.backgroundColor = UIColor.creditSesameLightGrayBackgroundColor | |
| topView.addTopSeparator() | |
| bottomView.backgroundColor = UIColor.creditSesameLightGrayBackgroundColor | |
| bottomView.addBottomSeparator() | |
| segmentControl.delegate = self | |
| segmentControl.datasource = self | |
| topView.heightAnchor.constraint(equalToConstant: 16).isActive = true | |
| segmentControl.heightAnchor.constraint(equalToConstant: 32).isActive = true | |
| bottomView.heightAnchor.constraint(equalToConstant: 16).isActive = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if TestingManager.shared.newCCFilteringVariation == Variations.variation { | |
| print("entro pir true: \(TestingManager.shared.newCCFilteringVariation)") | |
| //no muestro | |
| } else { | |
| print("entro por false: \(TestingManager.shared.newCCFilteringVariation)") | |
| let stackView = offersHeaderView.viewWithTag(40) as? UIStackView | |
| let topView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 16)) | |
| let bottomView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 16)) | |
| let segmentControl = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 32)) //as! DGScrollableSegmentControl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func testRewardsModule(email: String, password: String) { | |
| let rewardsKey = "REWARDS" | |
| let clickApplyId = "ccApplyId" | |
| testLogIn(email: email, password: password) | |
| let app = XCUIApplication() | |
| var row = 0 | |
| var element = app.tables.staticTexts.element(matching: .any, identifier: "\(rewardsKey),\(row)") | |
| while !element.exists { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension XCUIElement { | |
| func scrollToElement(element: XCUIElement) | |
| { | |
| while element.visible() == false | |
| { | |
| let app = XCUIApplication() | |
| let startCoord = app.tables.element.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)) | |
| let endCoord = startCoord.withOffset(CGVector(dx: 0.0, dy: -262)); | |
| startCoord.press(forDuration: 0.01, thenDragTo: endCoord) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func getSegmentValue(segmentNumber: Int) -> String { | |
| switch segmentNumber { | |
| case 1: | |
| return "New" | |
| case 2: | |
| return "Uninvolved" | |
| case 3: | |
| return "Constrained" | |
| case 4: | |
| return "Unqualified" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let bottonText = NSMutableAttributedString(string: "$\(currentPotentialCreditUsageValue) ", attributes: | |
| [NSAttributedString.Key.foregroundColor : UIColor.creditSesameGrayTextColor, | |
| NSAttributedString.Key.font : UIFont.latoBold(14)]) | |
| let tooltipAttachment = NSTextAttachment() | |
| tooltipAttachment.image = UIImage(named: "tooltip_icon") | |
| tooltipAttachment.bounds = CGRect(x: 0, y: -3, width: 18, height: 18) | |
| let imageString = NSAttributedString(attachment: tooltipAttachment) | |
| bottonText.append(imageString) | |
| //AQUI PONER GETURES RECOGNIZER 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ScoreIncreaseSimulationView.swift | |
| // finance | |
| // | |
| // Created by Fabiola Ramirez on 3/27/19. | |
| // Copyright © 2019 creditsesame. All rights reserved. | |
| // | |
| import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ScoreIncreaseSimTableViewController.swift | |
| // financeUI | |
| // | |
| // Created by Fabiola Ramirez on 3/29/19. | |
| // Copyright © 2019 creditsesame. All rights reserved. | |
| // | |
| import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func prepareForDeepLink(dismissScreen:@escaping () -> ()) { | |
| if var topController = UIApplication.shared.keyWindow?.rootViewController { | |
| while let presentedViewController = topController.presentedViewController { | |
| topController = presentedViewController | |
| } | |
| if topController is SFSafariViewController || topController.children.first is CreditSesameWebViewController || topController.children.first is AlertWebViewController { | |
| dismissScreen() | |
| } | |
| } |