This file contains 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
class WhatsappStatusCellSnapshotTests: FBSnapshotTestCase { | |
let cell = (Bundle.main.loadNibNamed(String(describing: WhatsappStatusCell.self), | |
owner: nil, options: nil)?.first as! WhatsappStatusCell) | |
var model: WhatsappStatusSnapshotModel? | |
var identifier: String? | |
override func setUp() { | |
super.setUp() | |
This file contains 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
private let combinations: [WhatsappStatusSnapshotModel] = { | |
let generator = SnapshotGenerator<WhatsappStatusSnapshotModel>() | |
let titles = [ | |
"Jhon Smith", | |
"Paco Perez", | |
"Dolores Fuertes de Barriga", | |
"Don Omar", | |
"Brhadaranyakopanishadvivekachudamani Erreh de la Huerta Castillo", | |
] |
This file contains 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
import FTMTableSectionModules | |
class WhatsappStatusSnapshotModel: SnapshotObject { | |
var imageName: String? | |
var title: String? | |
var subtitle: String? | |
var buttons: Bool? | |
} |
This file contains 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
public init(imageName: String, title: String, subtitle: String, buttons: Bool) { | |
self.imageName = imageName | |
self.title = title | |
self.subtitle = subtitle | |
self.buttons = buttons | |
} |
This file contains 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
class WhatsappStatusCellSnapshotTestsBasic: FBSnapshotTestCase { | |
var cell: WhatsappStatusCell? | |
override func setUp() { | |
super.setUp() | |
recordMode = false | |
let decorator = WhatsappStatusCellDecorator(imageName: "trujy", | |
title: "Francisco Trujillo", | |
subtitle: "5 minutes ago", |
This file contains 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
import FTMTableSectionModules | |
class WhatsappStateModule: TableSectionModule { | |
private var decorator : WhatsappStateModuleDecorator? | |
func configure(decorator : WhatsappStateModuleDecorator) { | |
self.decorator = decorator | |
createRows() | |
} |
This file contains 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
private enum Constants { | |
static let userAgentJavascript = "navigator.userAgent" | |
} | |
extension WKWebView { | |
func appendUserAgent(_ valueToAppend: String?) { | |
guard let valueToAppend = valueToAppend else { return } | |
let group = DispatchGroup() | |
let queue = DispatchQueue.main |
This file contains 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
class AttributedModule: TableSectionModule { | |
override func registerNibsForCells() -> [AnyClass] { | |
return super.registerNibsForCells() + [ | |
AttributtedCell.classForCoder(), | |
] | |
} | |
override func createRows() { | |
super.createRows() |
This file contains 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
//MARK: - RequestFriendsAttributedDecorator | |
private extension RequestFriendsAttributedDecorator { | |
var mainColor : UIColor { | |
return UIColor.black | |
} | |
var softColor : UIColor { | |
return UIColor.gray | |
} |
This file contains 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
class RequestFriendsAttributedDecorator: CommonAttributedDecorator { | |
override func attributedTitle() -> NSAttributedString? { | |
let attr = NSMutableAttributedString() | |
attr.append(mainAttributedInfo) | |
attr.append(attributedBreakLine) | |
attr.append(descAttributedInfo) | |
return attr | |
} | |
} |
NewerOlder