Add comprehensive headless tests for 10 controls with enhanced ItemsSource and method testing (#18)

* Initial plan

* Add comprehensive tests for 5 controls: Avatar, Clock, ClockTicks, AspectRatioLayout, AspectRatioLayoutItem

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Complete comprehensive headless tests for all 10 controls - added 72 more tests

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Add requested test cases for MultiComboBox and TreeComboBox - ItemsSource, Remove, Clear, hierarchical data

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* test: open dropdown to trigger materialization.

* test: set CurrentCulture to en-US for calendar view tests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Co-authored-by: rabbitism <dongbin@irihi.tech>
This commit is contained in:
Copilot
2025-08-02 17:12:06 +08:00
committed by GitHub
parent e80bfa35a3
commit 2e812357d7
12 changed files with 2643 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ public class CalendarYearButtonTests
[AvaloniaFact]
public void SetContext_YearMode_SetsContentToAbbreviatedMonthName()
{
CultureInfo.CurrentCulture = new CultureInfo("en-US");
var button = new CalendarYearButton();
var context = new CalendarContext(null, 5);
button.SetContext(CalendarViewMode.Year, context);