Skip to content

Commit 12e9d04

Browse files
committed
Fix some tests
# Conflicts: # src/Controls/tests/DeviceTests/Elements/ContentView/ContentViewTests.iOS.cs
1 parent 24de644 commit 12e9d04

File tree

16 files changed

+28
-25
lines changed

16 files changed

+28
-25
lines changed

src/Controls/tests/DeviceTests/Elements/AlertDialog/AlertDialogTests.Android.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Microsoft.Maui.DeviceTests
1313
{
14+
[Category(TestCategory.AlertDialog)]
1415
public partial class AlertDialogTests : ControlsHandlerTestBase
1516
{
1617

src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Task<bool> GetPlatformIsVisible(ButtonHandler buttonHandler)
4545
});
4646
}
4747

48-
[Theory(DisplayName = "Button Icon has Correct Position"), Category(TestCategory.Layout)]
48+
[Theory(DisplayName = "Button Icon has Correct Position")]
4949
[InlineData(Button.ButtonContentLayout.ImagePosition.Left)]
5050
[InlineData(Button.ButtonContentLayout.ImagePosition.Top)]
5151
[InlineData(Button.ButtonContentLayout.ImagePosition.Right)]

src/Controls/tests/DeviceTests/Elements/ContentView/ContentViewTests.iOS.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static int GetContentChildCount(ContentViewHandler contentViewHandler)
2020
return contentViewHandler.PlatformView.Subviews[0].Subviews.Length;
2121
}
2222

23-
[Fact, Category(TestCategory.Layout)]
23+
[Fact]
2424
public async Task ContentViewHasExpectedSize()
2525
{
2626
var contentView = new ContentView();
@@ -42,7 +42,7 @@ public async Task ContentViewHasExpectedSize()
4242
Assert.Equal(100, size.Height);
4343
}
4444

45-
[Fact, Category(TestCategory.Layout)]
45+
[Fact]
4646
public async Task ContentViewRespondsWhenViewAdded()
4747
{
4848
var contentView = new ContentView();
@@ -78,7 +78,7 @@ public async Task ContentViewRespondsWhenViewAdded()
7878
Assert.Equal(100, updatedSize.Height);
7979
}
8080

81-
[Fact(Skip="Failing https://github.com/dotnet/maui/issues/32368"), Category(TestCategory.Layout)]
81+
[Fact(Skip="Failing https://github.com/dotnet/maui/issues/32368")]
8282
public async Task ContentViewRespondsWhenViewRemoved()
8383
{
8484
var contentView = new ContentView();
@@ -115,7 +115,7 @@ public async Task ContentViewRespondsWhenViewRemoved()
115115
Assert.Equal(0, updatedSize.Height);
116116
}
117117

118-
[Fact, Category(TestCategory.Layout)]
118+
[Fact]
119119
public async Task ContentViewRespondsWhenViewUpdated()
120120
{
121121
var contentView = new ContentView();

src/Controls/tests/DeviceTests/Elements/Layout/LayoutTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ static void CreateLayout([DynamicallyAccessedMembers(System.Diagnostics.CodeAnal
208208
}
209209
}
210210

211-
[Fact, Category(TestCategory.FlexLayout)]
211+
[Fact]
212212
public async Task FlexLayoutInVerticalStackLayoutDoesNotCycle()
213213
{
214214
await FlexLayoutInStackLayoutDoesNotCycle(new VerticalStackLayout());
215215
}
216216

217-
[Fact, Category(TestCategory.FlexLayout)]
217+
[Fact]
218218
public async Task FlexLayoutInHorizontalStackLayoutDoesNotCycle()
219219
{
220220
await FlexLayoutInStackLayoutDoesNotCycle(new HorizontalStackLayout());
@@ -341,7 +341,6 @@ await AttachAndRun(grid, (handler) =>
341341
}
342342

343343
[Fact]
344-
[Category(TestCategory.Button, TestCategory.FlexLayout)]
345344
public async Task ButtonWithImageInFlexLayoutInGridDoesNotCycle()
346345
{
347346
EnsureHandlerCreated((builder) =>

src/Controls/tests/DeviceTests/Elements/TextInput/TextInputTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Microsoft.Maui.DeviceTests
66
{
7+
[Category(TestCategory.TextInput)]
78
public abstract partial class TextInputTests<THandler, TView> : ControlsHandlerTestBase
89
where THandler : class, IViewHandler, IPlatformViewHandler, new()
910
where TView : InputView, IView, ITextInput, new()

src/Controls/tests/DeviceTests/TestCategory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public static class TestCategory
44
{
55
public const string Accessibility = "Accessibility";
66
public const string Application = "Application";
7+
public const string AlertDialog = "AlertDialog";
78
public const string Behavior = "Behavior";
89
public const string Border = "Border";
910
public const string BoxView = "BoxView";

src/Core/tests/DeviceTests/Handlers/ContentView/ContentViewTests.iOS.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.Maui.DeviceTests.Handlers.ContentView
88
[Category(TestCategory.ContentView)]
99
public partial class ContentViewTests
1010
{
11-
[Fact, Category(TestCategory.FlowDirection)]
11+
[Fact]
1212
public async Task FlowDirectionPropagatesToContent()
1313
{
1414
var contentView = new ContentViewStub();
@@ -32,7 +32,7 @@ public async Task FlowDirectionPropagatesToContent()
3232
Assert.Equal(UIUserInterfaceLayoutDirection.RightToLeft, labelFlowDirection);
3333
}
3434

35-
[Fact, Category(TestCategory.FlowDirection)]
35+
[Fact]
3636
public async Task FlowDirectionPropagatesToDescendants()
3737
{
3838
var contentView = new ContentViewStub();
@@ -58,7 +58,7 @@ public async Task FlowDirectionPropagatesToDescendants()
5858
Assert.Equal(UIUserInterfaceLayoutDirection.RightToLeft, labelFlowDirection);
5959
}
6060

61-
[Fact, Category(TestCategory.FlowDirection)]
61+
[Fact]
6262
public async Task FlowDirectionPropagatesToUpdatedContent()
6363
{
6464
var contentView = new ContentViewStub() { FlowDirection = FlowDirection.RightToLeft };
@@ -84,7 +84,7 @@ public async Task FlowDirectionPropagatesToUpdatedContent()
8484
Assert.Equal(UIUserInterfaceLayoutDirection.RightToLeft, labelFlowDirection);
8585
}
8686

87-
[Fact, Category(TestCategory.FlowDirection)]
87+
[Fact]
8888
public async Task DoesNotPropagateToContentWithExplicitFlowDirection()
8989
{
9090
var contentView = new ContentViewStub();

src/Core/tests/DeviceTests/Handlers/Image/ImageHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public partial class ImageHandlerTests : ImageHandlerTests<ImageHandler, ImageSt
2424
{
2525
}
2626

27+
[Category(TestCategory.Image)]
2728
public abstract partial class ImageHandlerTests<TImageHandler, TStub> : CoreHandlerTestBase<TImageHandler, TStub>
2829
where TImageHandler : class, IImageHandler, new()
2930
where TStub : StubBase, IImageStub, new()

src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.Windows.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace Microsoft.Maui.DeviceTests
1212
public partial class LabelHandlerTests
1313
{
1414
[Theory]
15-
[Category(TestCategory.Fonts)]
1615
[InlineData(true, Skip = "https://github.com/dotnet/maui/issues/26749")]
1716
[InlineData(false)]
1817
public async Task FontFamilyIsCorrectForRendering(bool validateSize)
@@ -43,7 +42,6 @@ public async Task FontFamilyIsCorrectForRendering(bool validateSize)
4342
}
4443

4544
[Theory]
46-
[Category(TestCategory.Fonts)]
4745
[InlineData(true, Skip = "https://github.com/dotnet/maui/issues/26749")]
4846
[InlineData(false)]
4947
public async Task EmbeddedFontFamilyIsCorrectForRendering(bool validateSize)

src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ await ValidateUnrelatedPropertyUnaffected(
211211
#if !WINDOWS
212212

213213
[Fact]
214-
[Category(TestCategory.TextFormatting)]
215214
public async Task LineHeightAppliedWhenTextAdded()
216215
{
217216
double xplatLineHeight = 2;
@@ -230,7 +229,6 @@ public async Task LineHeightAppliedWhenTextAdded()
230229
}
231230

232231
[Fact]
233-
[Category(TestCategory.TextFormatting)]
234232
public async Task CharacterSpacingAppliedWhenTextAdded()
235233
{
236234
double xplatCharacterSpacing = 1.5;
@@ -249,7 +247,6 @@ public async Task CharacterSpacingAppliedWhenTextAdded()
249247
}
250248

251249
[Fact]
252-
[Category(TestCategory.TextFormatting)]
253250
public async Task LineHeightSurvivesCharacterSpacing()
254251
{
255252
double xplatCharacterSpacing = 1.5;

0 commit comments

Comments
 (0)