Skip to content

Instantly share code, notes, and snippets.

View FabiolaRamirez's full-sized avatar

Fabiola Ramírez FabiolaRamirez

  • Bolivia - La Paz
View GitHub Profile
//
// BestOffersViewController.swift
// finance
//
// Created by David Yanez on 4/2/18.
// Copyright © 2018 creditsesame. All rights reserved.
//
import UIKit
import SnapKit
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
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
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 {
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)
func getSegmentValue(segmentNumber: Int) -> String {
switch segmentNumber {
case 1:
return "New"
case 2:
return "Uninvolved"
case 3:
return "Constrained"
case 4:
return "Unqualified"
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
//
// ScoreIncreaseSimulationView.swift
// finance
//
// Created by Fabiola Ramirez on 3/27/19.
// Copyright © 2019 creditsesame. All rights reserved.
//
import UIKit
//
// ScoreIncreaseSimTableViewController.swift
// financeUI
//
// Created by Fabiola Ramirez on 3/29/19.
// Copyright © 2019 creditsesame. All rights reserved.
//
import UIKit
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()
}
}