-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/Controls/samples/Controls.Sample.UITests/Issues/Issue17665.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,22 @@ | ||
using Microsoft.Maui.Controls; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 17665, "Image is not centered in AspectFill mode", PlatformAffected.UWP)] | ||
public class Issue17665 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
Content = | ||
new Grid() | ||
{ | ||
new Image() | ||
{ | ||
AutomationId = "AspectFillImage", | ||
Aspect = Microsoft.Maui.Aspect.AspectFill, | ||
WidthRequest = 100, | ||
} | ||
}; | ||
} | ||
} | ||
} |
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,26 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue17665 : _IssuesUITest | ||
{ | ||
public Issue17665(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "Image is not centered in AspectFill mode"; | ||
|
||
[Test] | ||
[Category(UITestCategories.ActionSheet)] | ||
public void Issue17665Test() | ||
{ | ||
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Mac, TestDevice.iOS }, "Only affects Windows."); | ||
|
||
App.WaitForElement("AspectFillImage", timeout: TimeSpan.FromSeconds(4)); | ||
|
||
VerifyScreenshot(); | ||
} | ||
} | ||
} |