forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request unoplatform#11226 from Youssef1313/calendar-date-p…
…icker-test test: Add test for CalendarDatePicker
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_CalendarDatePicker.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using static Private.Infrastructure.TestServices; | ||
|
||
namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Controls; | ||
|
||
[TestClass] | ||
[RunsOnUIThread] | ||
public class Given_CalendarDatePicker | ||
{ | ||
#if !WINDOWS_UWP && !__MACOS__ // test is failling in macOS for some reason. | ||
[TestMethod] | ||
public async Task TestCalendarPanelSize() | ||
{ | ||
var SUT = new CalendarDatePicker(); | ||
WindowHelper.WindowContent = SUT; | ||
await WindowHelper.WaitForIdle(); | ||
|
||
var root = (Grid)SUT.FindName("Root"); | ||
var flyout = (Flyout)FlyoutBase.GetAttachedFlyout(root); | ||
flyout.Open(); | ||
|
||
await WindowHelper.WaitForIdle(); | ||
var calendarView = (CalendarView)flyout.Content; | ||
|
||
Assert.IsTrue(calendarView.ActualHeight > 300); | ||
|
||
flyout.Close(); | ||
} | ||
#endif | ||
} |