Skip to content

Instantly share code, notes, and snippets.

@otaviocc
otaviocc / XCTestCase+WaitUntil.swift
Created August 21, 2022 18:29
XCTestCase Wait Until
extension XCTestCase {
func waitUntil(
timeout: TimeInterval = 1,
isInverted: Bool = false,
fulfillmentCount: Int = 1,
block: @escaping (@escaping () -> Void) -> Void
) {
let expectation = expectation(
description: "isInverted: \(isInverted), fulfillmentCount: \(fulfillmentCount)"
{
"backgroundColor": "rgba(76,86,106,1)",
"backgroundImage": null,
"backgroundImageSelection": null,
"backgroundMode": "color",
"dropShadow": true,
"dropShadowBlurRadius": "19px",
"dropShadowOffsetY": "8px",
"exportSize": "2x",
"firstLineNumber": 42,
struct TitleTextStyle: TextStyle {
func makeBody(
_ configuration: TextStyleConfiguration
) -> some View {
configuration.text
.font(.title)
.fontWeight(.bold)
.foregroundColor(.accentColor)
}
}