Skip to content

Commit

Permalink
Merge branch 'main' into enable-xamarinuitest-23
Browse files Browse the repository at this point in the history
  • Loading branch information
anandhan-rajagopal authored Nov 30, 2024
2 parents 5c5a6cd + 1e33657 commit d0a998e
Show file tree
Hide file tree
Showing 28 changed files with 382 additions and 352 deletions.
1 change: 0 additions & 1 deletion eng/NuGetVersions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@
Version="$(SystemDrawingCommonPackageVersion)"
/>


<PackageReference Update="Microsoft.DotNet.Build.Tasks.Workloads" Version="$(MicrosoftDotNetBuildTasksWorkloadsPackageVersion)" />
<PackageReference Update="Microsoft.Signed.WiX" Version="$(MicrosoftSignedWixVersion)" />
<PackageReference Update="MicroBuild.Plugins.SwixBuild.Dotnet" Version="$(MicroBuildPluginsSwixBuildDotnetPackageVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<FizzlerPackageVersion>1.3.0</FizzlerPackageVersion>
<TizenUIExtensionsVersion>0.9.0</TizenUIExtensionsVersion>
<ExCSSPackageVersion>4.2.3</ExCSSPackageVersion>
<SystemDrawingCommonPackageVersion>8.0.3</SystemDrawingCommonPackageVersion>
<SystemDrawingCommonPackageVersion>9.0.0</SystemDrawingCommonPackageVersion>
<MicrosoftDotNetBuildTasksFeedVersion>9.0.0-beta.24572.2</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24572.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>9.0.0-beta.24572.2</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
Expand Down
2 changes: 0 additions & 2 deletions src/Controls/src/Build.Tasks/Controls.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="0.11.5" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Include="System.CodeDom" Version="7.0.0" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Build" Version="17.8.3" PrivateAssets="all" Condition=" '$(_IncludeMicrosoftBuildPackage)' == 'true' "/>
<PackageReference Include="Microsoft.Build.Framework" Version="17.8.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.8.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.8.3" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Maui.Controls.Sample.Issues;


[Issue(IssueTracker.Github, 1028, "ViewCell in TableView raises exception - root page is ContentPage, Content is TableView", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
[Issue(IssueTracker.Github, 1028, "ViewCell in TableView raises exception - root page is ContentPage, Content is TableView", PlatformAffected.WinPhone)]

public class Issue1028 : TestContentPage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AboutPage : ContentPage
public AboutPage()
{
BackgroundColor = Colors.Bisque;
Content = new Button { Text = "Close", Command = new Command(() => Navigation.PopModalAsync()) };
Content = new Button { Text = "CloseMe", Command = new Command(() => Navigation.PopModalAsync()) };

}
}
12 changes: 6 additions & 6 deletions src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue2809.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
namespace Maui.Controls.Sample.Issues;

using Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 2809, "Secondary ToolbarItems cause app to hang during PushAsync", PlatformAffected.iOS)]
public class Issue2809 : TestContentPage
public class Issue2809 : TestNavigationPage
{
protected override void Init()
{
ToolbarItems.Add(new ToolbarItem("Item 1", string.Empty,
var contentPage = new ContentPage();
contentPage.ToolbarItems.Add(new ToolbarItem("Item 1", string.Empty,
DummyAction, ToolbarItemOrder.Secondary));

ToolbarItems.Add(new ToolbarItem("Item 2", string.Empty,
contentPage.ToolbarItems.Add(new ToolbarItem("Item 2", string.Empty,
DummyAction, ToolbarItemOrder.Secondary));
Navigation.PushAsync(contentPage);
}

public void DummyAction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ protected override void Init()
Content = new StackLayout
{
Orientation = StackOrientation.Vertical,
VerticalOptions = LayoutOptions.Start,
Children = { tableview, listview, listview2 }
};
}
Expand Down
18 changes: 9 additions & 9 deletions src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue8279.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Issue8279 : TestContentPage
const string ScrollWithItemWithGroup = "ScrollWithItemWithGroup";
const string ScrollWithNoItemNoGroup = "ScrollWithNoItemNoGroup";
const string ScrollWithNoItemEmptyGroup = "ScrollWithNoItemEmptyGroup";
const string Reset = "Reset";
const string ResetButton = "Reset";

protected override void Init()
{
Expand Down Expand Up @@ -97,7 +97,7 @@ public Issue8279()
var resetButton = new Button()
{
Text = "Reset",
AutomationId = Reset,
AutomationId = ResetButton,
Command = new Command(() => List.ScrollTo(null, firstGroup, ScrollToPosition.Center, true))
};

Expand All @@ -111,13 +111,13 @@ public Issue8279()
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0618 // Type or member is obsolete

stackLayout.AddLogicalChild(resetButton);
stackLayout.AddLogicalChild(button1);
stackLayout.AddLogicalChild(button2);
stackLayout.AddLogicalChild(button3);
stackLayout.AddLogicalChild(button4);
stackLayout.AddLogicalChild(button5);
stackLayout.AddLogicalChild(List);
stackLayout.Children.Add(resetButton);
stackLayout.Children.Add(button1);
stackLayout.Children.Add(button2);
stackLayout.Children.Add(button3);
stackLayout.Children.Add(button4);
stackLayout.Children.Add(button5);
stackLayout.Children.Add(List);

Content = stackLayout;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 8461, "[Bug] [iOS] [Shell] \"Nav Stack consistency error\"", PlatformAffected.iOS)]
[Issue(IssueTracker.Github, 8461, "[Bug] [iOS] [Shell] Nav Stack consistency error", PlatformAffected.iOS)]
public class Issue8461 : TestShell
{
const string ButtonId = "PageButtonId";
Expand Down Expand Up @@ -28,6 +28,7 @@ protected override void Init()
{
new Label()
{
AutomationId = "InstructionsLabel",
Text = "1. Swipe left to dismiss this page, but cancel the gesture before it completes"
},
new Label()
Expand Down Expand Up @@ -55,7 +56,7 @@ protected override void Init()
};

// Use this BoxView to anchor our swipe to left of the screen
grid.AddLogicalChild(new BoxView()
grid.Children.Add(new BoxView()
{
AutomationId = LayoutId,
HorizontalOptions = LayoutOptions.FillAndExpand,
Expand All @@ -66,8 +67,8 @@ protected override void Init()
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0618 // Type or member is obsolete
grid.AddLogicalChild(instructions);
grid.Children.Add(instructions);

page2.Content = grid;
}
}
}
2 changes: 1 addition & 1 deletion src/Controls/tests/TestCases.HostApp/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static MauiApp CreateMauiApp()
{
var appBuilder = MauiApp.CreateBuilder();

#if IOS || ANDROID
#if IOS || ANDROID || MACCATALYST
appBuilder.UseMauiMaps();
#endif
appBuilder.UseMauiApp<App>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
/*using NUnit.Framework;
#if TEST_FAILS_ON_WINDOWS //Maps control is not supported on Windows platform.
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

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

public override string Issue => "Microsoft.Maui.Controls.Maps is not updating VisibleRegion property when layout is changed";
public override string Issue => "Microsoft.Maui.Controls.Maps is not updating VisibleRegion property when layout is changed";

[Test]
[Category(UITestCategories.Maps)]
public void Bugzilla26171Test()
{
App.WaitForElement("lblValue");
}
}*/
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ public void Bugzilla30317ItemSourceTabbedPage()
}
}
#endif
*/
*/
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public Issue1028(TestDevice testDevice) : base(testDevice)

public override string Issue => "ViewCell in TableView raises exception - root page is ContentPage, Content is TableView";

// [Test]
// [Category(UITestCategories.TableView)]
// public void ViewCellInTableViewDoesNotCrash()
// {
// // If we can see this element, then we didn't crash.
// App.WaitForElement("Custom Slider View:");
// }
[Test]
[Category(UITestCategories.TableView)]
public void ViewCellInTableViewDoesNotCrash()
{
// If we can see this element, then we didn't crash.
App.WaitForElement("Custom Slider View:");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@ namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue12685 : _IssuesUITest
{
const string StatusLabelId = "StatusLabelId";
const string ResetStatus = "Path touch event not fired, touch path above.";
const string ClickedStatus = "Path was clicked, click reset button to start over.";
public Issue12685(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "[iOs][Bug] TapGestureRecognizer in Path does not work on iOS";

// [Test]
// [Category(UITestCategories.Shape)]
// [FailsOnIOS]
// public void ShapesPathReceiveGestureRecognizers()
// {
// var testLabel = App.WaitForFirstElement(StatusLabelId);
// Assert.AreEqual(ResetStatus, testLabel.ReadText());
// var testPath = App.WaitForFirstElement(PathId);
// var pathRect = testPath.Rect;
// App.TapCoordinates(pathRect.X + 1, pathRect.Y + 1);
// Assert.AreEqual(ClickedStatus, App.WaitForFirstElement(StatusLabelId).ReadText());
// }
[Test]
[Category(UITestCategories.Shape)]
public void ShapesPathReceiveGestureRecognizers()
{
var testLabel = App.WaitForFirstElement(StatusLabelId);
Assert.That(testLabel.ReadText(), Is.EqualTo(ResetStatus));
var labelRect = App.WaitForFirstElement(StatusLabelId).GetRect(); // Path element not able get via automationid so getting the rect of the label calculated points to tap on the path
#if MACCATALYST // TapCoordinates is not working on MacCatalyst Issue: https://github.com/dotnet/maui/issues/19754
App.ClickCoordinates(labelRect.X + 3, labelRect.Y - 10);
#else
App.TapCoordinates(labelRect.X + 3, labelRect.Y - 10);
#endif
App.WaitForElement(StatusLabelId);
Assert.That(testLabel.ReadText(), Is.EqualTo(ClickedStatus));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,56 @@ namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue2470 : _IssuesUITest
{
#if ANDROID
const string Generate = "GENERATE";
const string Results = "RESULTS";
#else
const string Generate = "Generate";
const string Results = "Results";
#endif
public Issue2470(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "ObservableCollection changes do not update ListView";

//[Test]
//[Category(UITestCategories.ListView)]
//public void OnservableCollectionChangeListView()
//{
// // Tab 1
// App.Tap(q => q.Marked("Switch"));
// App.Screenshot("Switch On");
// App.Tap(q => q.Marked("Results"));

// // Tab 2
// App.WaitForElement(q => q.Marked("Entry 0 of 5"));
// App.WaitForElement(q => q.Marked("Entry 1 of 5"));
// App.WaitForElement(q => q.Marked("Entry 2 of 5"));
// App.WaitForElement(q => q.Marked("Entry 3 of 5"));
// App.WaitForElement(q => q.Marked("Entry 4 of 5"));
// App.Screenshot("Should be 5 elements");
// App.Tap(q => q.Marked("Generate"));

// // Tab 1
// App.Tap(q => q.Marked("Switch"));
// App.Screenshot("Switch Off");
// App.Tap(q => q.Marked("Results"));

// // Tab 2
// App.WaitForElement(q => q.Marked("Entry 0 of 2"));
// App.WaitForElement(q => q.Marked("Entry 1 of 2"));
// App.Screenshot("Should be 2 elements");

// // Tab 1
// App.Tap(q => q.Marked("Generate"));
// App.Tap(q => q.Marked("Switch"));
// App.Screenshot("Switch On");
// App.Tap(q => q.Marked("Results"));

// // Tab 2
// App.WaitForElement(q => q.Marked("Entry 0 of 5"));
// App.WaitForElement(q => q.Marked("Entry 1 of 5"));
// App.WaitForElement(q => q.Marked("Entry 2 of 5"));
// App.WaitForElement(q => q.Marked("Entry 3 of 5"));
// App.WaitForElement(q => q.Marked("Entry 4 of 5"));
// App.Screenshot("Should be 5 elements");
//}
[Test]
[Category(UITestCategories.ListView)]
public void OnservableCollectionChangeListView()
{
App.WaitForElement("Switch");
// Tab 1
App.Tap("Switch");
App.Tap(Results);

// Tab 2
App.WaitForElement("Entry 0 of 5");
App.WaitForElement("Entry 1 of 5");
App.WaitForElement("Entry 2 of 5");
App.WaitForElement("Entry 3 of 5");
App.WaitForElement("Entry 4 of 5");

App.Tap(Generate);

// Tab 1
App.Tap("Switch");
App.Tap(Results);

// Tab 2
App.WaitForElement("Entry 0 of 2");
App.WaitForElement("Entry 1 of 2");


// Tab 1
App.Tap(Generate);
App.Tap("Switch");
App.Tap(Results);

// Tab 2
App.WaitForElement("Entry 0 of 5");
App.WaitForElement("Entry 1 of 5");
App.WaitForElement("Entry 2 of 5");
App.WaitForElement("Entry 3 of 5");
App.WaitForElement("Entry 4 of 5");
}
}
Loading

0 comments on commit d0a998e

Please sign in to comment.