Skip to content

Instantly share code, notes, and snippets.

View CollectiveHealth-gists's full-sized avatar

CollectiveHealth-gists

View GitHub Profile
@CollectiveHealth-gists
CollectiveHealth-gists / testingiOS_flags-file.swift
Created July 10, 2017 23:30
Testing iOS at Collective Health: A flags file
enum LaunchArguments {
/// Reset our defaults, deletes the persistent store, and clears
/// keychain on launch
static let ResetDefaults = "ResetDefaults"
/// Turn off all animations
static let NoAnimations = "NoAnimations"
/// Get Care Search Result
@CollectiveHealth-gists
CollectiveHealth-gists / testingiOS_sample-test.swift
Created July 10, 2017 23:29
Testing iOS at Collective Health: A Sample Test
func testAnnotationConfig() {
let providers = generateTestProviders()
let model = SearchResultsMapViewModel(searchLocation: nil, details: providers)
let annotation = model.getAnnotations().first as! GetCareAnnotation
let indexPath = NSIndexPath(forRow: 0, inSection: 0)
let details = SearchResultsMapViewModel.configForAnnotation(annotation)
XCTAssertEqual(details.title, "Bob Boberson")
XCTAssertEqual(details.subtitle, "Plastic Surgery")
@CollectiveHealth-gists
CollectiveHealth-gists / testingiOS_example-ViewModel.swift
Created July 7, 2017 23:16
Testing iOS at Collective Health: An Example of the View Model for our search results map view
struct SearchResultsMapViewModel {
init(searchLocation loc: SearchLocationDescription?, details: [GetCareProvider])
func getAnnotations() -> [MKAnnotation]
func getProviderForAnnotation(annotation: GetCareAnnotation) -> CollectiveHealth.GetCareProvider?
static func configForAnnotation(annotation: GetCareAnnotation) -> CollectiveHealth.LocationDetailsTableViewModel
@CollectiveHealth-gists
CollectiveHealth-gists / caseforsassmaps_sassmap-buttons.scss
Created July 7, 2017 23:12
The Case for Sass Maps: Sass Map Buttons
////////////////////////
// Variables
////////////////////////
$themeColors: (
gray-dark: #333,
gray: #777,
gray-light: #ccc,
white: #fff,
red: #d9534f,
@CollectiveHealth-gists
CollectiveHealth-gists / caseforsassmaps_bootstrap-buttons.scss
Created July 7, 2017 23:10
The Case for Sass Maps: Bootstrap Buttons
////////////////////////
// Variables
////////////////////////
$btn-default-color: #333;
$btn-default-bg: #fff;
$btn-default-border: #ccc;
$btn-primary-color: #fff;
$btn-primary-bg: $brand-primary;