iOS/Tests/Shared/DesignSystem/Components/HAButtonStyles.test.swift
Bruno Pantaleão Gonçalves 129514f5d2
Add outlined ha button (#3818)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-15 12:17:05 -03:00

37 lines
1.2 KiB
Swift

@testable import Shared
import SharedTesting
import SwiftUI
import Testing
import WidgetKit
struct HAButtonStylesTests {
@MainActor
@Test func testAppButtonStyles() async throws {
let listOfButtons = AnyView(
VStack {
Button("primaryButton") {}
.buttonStyle(.primaryButton)
Button("outlinedButton") {}
.buttonStyle(.outlinedButton)
Button("secondaryButton") {}
.buttonStyle(.secondaryButton)
Button("negativeButton") {}
.buttonStyle(.negativeButton)
Button("neutralButton") {}
.buttonStyle(.neutralButton)
Button("secondaryNegativeButton") {}
.buttonStyle(.secondaryNegativeButton)
Button("linkButton") {}
.buttonStyle(.linkButton)
Button("criticalButton") {}
.buttonStyle(.criticalButton)
}
.padding(.horizontal)
.listRowSeparator(.hidden)
)
// TODO: Figure it out a way that views with liquid glass applied show up in the snapshots
assertLightDarkSnapshots(of: listOfButtons)
}
}