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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue31064.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
namespace Controls.TestCases.HostApp.Issues;

[Issue(IssueTracker.Github, "31064", "Indicator view size should update dynamically", PlatformAffected.iOS)]

public class Issue31064 : ContentPage
{
IndicatorView _indicator;

public Issue31064()
{
var carousel = new CarouselView
{
ItemsSource = new[] { "Item 1", "Item 2", "Item 3" },
HeightRequest = 250,
HorizontalScrollBarVisibility = ScrollBarVisibility.Never,
};

_indicator = new IndicatorView
{
HorizontalOptions = LayoutOptions.Center
};

carousel.IndicatorView = _indicator;

var button = new Button
{
AutomationId = "Issue31064Button",
Text = "Increase Indicator Size",
HorizontalOptions = LayoutOptions.Center
};
button.Clicked += (s, e) =>
{
_indicator.IndicatorSize = 20;
};

Content = new VerticalStackLayout
{
Spacing = 20,
Padding = 20,
Children =
{
new Label
{
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
Text = "Test passes if IndicatorView size updates dynamically"
},
carousel,
_indicator,
button
}
};
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue31064 : _IssuesUITest
{
public Issue31064(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "Indicator view size should update dynamically";

[Test]
[Category(UITestCategories.IndicatorView)]
public void Issue31064IndicatorViewSizeUpdatesDynamically()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending snapshot on Windows:
image
Could you commit it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz I have committed the snapshot

{
App.WaitForElement("Issue31064Button");
App.Tap("Issue31064Button");
VerifyScreenshot();
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Core/src/Platform/iOS/UIPageControlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void UpdateIndicatorShape(this MauiPageControl pageControl, IIndic
public static void UpdateIndicatorSize(this MauiPageControl pageControl, IIndicatorView indicatorView)
{
pageControl.IndicatorSize = indicatorView.IndicatorSize;
pageControl.LayoutSubviews();
pageControl.InvalidateMeasure();
}

public static void UpdateHideSingle(this UIPageControl pageControl, IIndicatorView indicatorView)
Expand Down
Loading