//
//  LoadingSheetTests.swift
//  SportsTimeTests
//

import Testing
import SwiftUI
@testable import SportsTime

struct LoadingSheetTests {

    @Test func sheetRequiresLabel() {
        let sheet = LoadingSheet(label: "Planning trip")
        #expect(sheet.label == "Planning trip")
    }

    @Test func sheetCanHaveOptionalDetail() {
        let withDetail = LoadingSheet(label: "Exporting", detail: "Generating maps...")
        let withoutDetail = LoadingSheet(label: "Loading")

        #expect(withDetail.detail == "Generating maps...")
        #expect(withoutDetail.detail == nil)
    }

    @Test func backgroundOpacityIsCorrect() {
        #expect(LoadingSheet.backgroundOpacity == 0.5)
    }
}
