Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ protected virtual void RegisterViewTypes()

protected virtual CGRect DetermineEmptyViewFrame()
{
nfloat emptyViewHeight = 0;
nfloat emptyViewHeight = CollectionView.Frame.Height;

if (_emptyViewFormsElement is IView emptyView)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Controls.Sample.UITests;
using Maui.Controls.Sample.CollectionViewGalleries.EmptyViewGalleries;
using Maui.Controls.Sample.CollectionViewGalleries.GroupingGalleries;
using Maui.Controls.Sample.CollectionViewGalleries.HeaderFooterGalleries;
using Maui.Controls.Sample.CollectionViewGalleries.ItemSizeGalleries;
Expand Down Expand Up @@ -44,6 +45,7 @@ public CollectionViewCoreGalleryContentPage()
// ItemsFromViewModelShouldBeSelected (src\Compatibility\ControlGallery\src\Issues.Shared\CollectionViewBoundMultiSelection.cs)
TestBuilder.NavButton("Selection Galleries", () => new SelectionGallery(), Navigation),
TestBuilder.NavButton("Item Size Galleries", () => new ItemsSizeGallery(), Navigation),
TestBuilder.NavButton("EmptyView Galleries", () => new EmptyViewGallery(), Navigation)
}
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests
{
#if IOS
public class CollectionViewEmptyViewTests : CollectionViewUITests
{
protected override bool ResetAfterEachTest => true;

public CollectionViewEmptyViewTests(TestDevice device)
: base(device)
{
}

[Test]
[Category(UITestCategories.CollectionView)]
public void EmptyViewItemsSourceNullStringWorks()
{
VisitInitialGallery("EmptyView");

VisitSubGallery("EmptyView (null ItemsSource)");

// EmptyView string
App.WaitForElement("Nothing to display.");
}

[Test]
[Category(UITestCategories.CollectionView)]
public void EmptyViewItemsSourceNullViewWorks()
{
VisitInitialGallery("EmptyView");

VisitSubGallery("EmptyView (null ItemsSource) View");

// EmptyView string
App.WaitForElement("Nothing to display.");
}
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Tests.Issues
namespace Microsoft.Maui.TestCases.Tests.Issues
{
internal class Issue25551 : _IssuesUITest
{
Expand Down