Repository navigation
test(avalonia): headless tests for rendering, change events, overlays and theme - #33
Merged
Merged
Conversation
… and theme - Every component renders in light and dark (Skia, no display) - Change events: code-set values stay silent, clicks and keys raise once - Dialog traps Tab and returns focus on Escape; Dropdown closes on a click outside without clicking through; HoverCard stays open while hovered and closes on leave - Token brushes follow SetTheme - CI runs them on ubuntu, windows and macOS fix(avalonia): ShellTheme publishes its palettes to a new Application The initialized flag was a static bool, so a second Application (one per headless test) never got the palettes and every token lookup failed.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Avalonia headless tests, and a theme fix they found.
tests/ShellUI.Native.Avalonia.Tests(xunit v3, Avalonia.Headless.XUnit 12.1.3, Skia). It compiles the Avalonia demo's component files, so it tests the code the CLI ships.SetTheme;ThemeChangedfires.ShellUI.Native.slnx; thebuild-avaloniaCI job (ubuntu, windows, macOS) runs it.ShellTheme.EnsureInitializedused a static bool, so a secondApplicationnever got the theme palettes and every token lookup failed. It now remembers which application it set up. Template synced.Type of Change
Checklist
Testing Done