Skip to content

Commit

Permalink
Merge pull request unoplatform#11226 from Youssef1313/calendar-date-p…
Browse files Browse the repository at this point in the history
…icker-test

test: Add test for CalendarDatePicker
  • Loading branch information
jeromelaban authored Feb 8, 2023
2 parents 3022c02 + 96bbef4 commit 09edbee
Showing 1 changed file with 36 additions and 0 deletions.
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
}

0 comments on commit 09edbee

Please sign in to comment.