Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 882bf07

Browse files
committed
Add instructions and test attributes for 38827; fixes #2304
Add instructions for test 36393; fixes #2267 Add missing image for Android to 39963 test; fixes #2333; Also remove automated test, since it requires manual review; fixes #2330; Correct typo, remove copy/paste comments; Add instructions to test 39853; fixes #2328 Add instructions for test 39829; fixes #2326; Remove automated test for 39829; Add instructions to test 36846; fixes #2289
1 parent 2082976 commit 882bf07

File tree

9 files changed

+59
-55
lines changed

9 files changed

+59
-55
lines changed
3.37 KB
Loading

Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@
346346
<ItemGroup>
347347
<AndroidResource Include="Resources\drawable\red_button.xml" />
348348
</ItemGroup>
349+
<ItemGroup>
350+
<AndroidAsset Include="Assets\test.jpg" />
351+
</ItemGroup>
349352
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
350353
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
351354
<Import Project="..\packages\Xamarin.Insights.1.11.4\build\MonoAndroid10\Xamarin.Insights.targets" Condition="Exists('..\packages\Xamarin.Insights.1.11.4\build\MonoAndroid10\Xamarin.Insights.targets')" />

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36393.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@ public class Bugzilla36393 : TestContentPage
1717
{
1818
protected override void Init()
1919
{
20+
var instructions = new Label
21+
{
22+
Text =
23+
"If running on Android, all of the Label, Entry, Editor, and SearchBar text sizes below should be"
24+
+ " the same size."
25+
+ " If they are not, the test has failed."
26+
+ " This test should be ignored on non-Android platforms."
27+
};
28+
2029
var label = new Label { FontSize = 18 };
21-
var entry = new Entry { };
22-
var editor = new Editor { };
23-
var searchBar = new SearchBar { };
30+
var entry = new Entry();
31+
var editor = new Editor();
32+
var searchBar = new SearchBar();
2433

2534
label.Text = $"I am label. FontSize:{label.FontSize}";
2635
entry.Text = $"I am entry. FontSize:{entry.FontSize}";
@@ -29,17 +38,8 @@ protected override void Init()
2938

3039
Content = new StackLayout
3140
{
32-
Children = { label, entry, editor, searchBar }
41+
Children = { instructions, label, entry, editor, searchBar }
3342
};
3443
}
35-
36-
#if UITEST
37-
[Test]
38-
[Category(UITestCategories.ManualReview)]
39-
public void FontSizeComparisonTest()
40-
{
41-
RunningApp.Screenshot("If all of the font sizes are visibly the same size, this test has passed.");
42-
}
43-
#endif
4444
}
4545
}

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36846.cs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,12 @@
77
using NUnit.Framework;
88
#endif
99

10-
// Apply the default category of "Issues" to all of the tests in this assembly
11-
// We use this as a catch-all for tests which haven't been individually categorized
12-
#if UITEST
13-
[assembly: NUnit.Framework.Category("Issues")]
14-
#endif
15-
1610
namespace Xamarin.Forms.Controls.Issues
1711
{
1812
[Preserve(AllMembers = true)]
19-
[Issue(IssueTracker.Bugzilla, 36846, "ActionBar does not dismiss when content which called it is removed", PlatformAffected.Android)]
20-
public class Bugzilla36846 : TestNavigationPage // or TestMasterDetailPage, etc ...
13+
[Issue(IssueTracker.Bugzilla, 36846, "ActionBar does not dismiss when content which called it is removed",
14+
PlatformAffected.Android)]
15+
public class Bugzilla36846 : TestNavigationPage
2116
{
2217
protected override void Init()
2318
{
@@ -39,6 +34,16 @@ public ListWithLongPress()
3934
Orientation = StackOrientation.Vertical
4035
};
4136

37+
var instructions = new Label
38+
{
39+
Text = "This test only applies to Android. "
40+
+ "Long press one of the items in the list. The Action Bar should appear. "
41+
+ "Tap the 'Clear List' button. The list should clear and the Action Bar should disappear. "
42+
+ "If the action bar remains, this test has failed."
43+
};
44+
45+
stackLayout.Children.Add(instructions);
46+
4247
var listView = new ListView
4348
{
4449
HasUnevenRows = true,

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
HorizontalOptions="FillAndExpand"
1717
AutomationId="LoginPageIdentifier"
1818
FontSize="Large"
19-
Text="Sign in with your Xamarin account to save and sync favorites and session feedback. Sign in with your Xamarin account to save and sync favorites and session feedback. Sign in with your Xamarin account to save and sync favorites and session feedback. Sign in with your Xamarin account to save and sync favorites and session feedback."/>
19+
Text="This text should be wrapping. If it is not, the test has failed. This text should be wrapping. If it is not, the test has failed. This text should be wrapping. If it is not, the test has failed. This text should be wrapping. If it is not, the test has failed. This text should be wrapping. If it is not, the test has failed."/>
2020

2121
</StackLayout>
2222
</Grid>

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
using System.Threading.Tasks;
66

77
using Xamarin.Forms;
8+
using Xamarin.Forms.CustomAttributes;
9+
using Xamarin.Forms.Internals;
810

911
namespace Xamarin.Forms.Controls.Issues
1012
{
13+
[Preserve(AllMembers = true)]
14+
[Issue(IssueTracker.Bugzilla, 38827, "UWP - Text not wrapping")]
1115
public partial class Bugzilla38827 : ContentPage
1216
{
1317
public Bugzilla38827 ()

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39829.cs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,28 @@
1111
namespace Xamarin.Forms.Controls.Issues
1212
{
1313
[Preserve(AllMembers = true)]
14-
[Issue(IssueTracker.Bugzilla, 39829, "RowHeight of ListView is not working for UWP", PlatformAffected.WinRT)]
14+
[Issue(IssueTracker.Bugzilla, 39829, "RowHeight of ListView is not working for UWP", PlatformAffected.UWP)]
1515
public class Bugzilla39829 : TestContentPage
1616
{
1717
protected override void Init()
1818
{
1919
Title = "Master";
20+
21+
var instructions = new Label
22+
{
23+
Text = "The text items in the list below should be spaced far apart vertically. "
24+
+ "If they are close together, this test has failed."
25+
26+
};
27+
2028
var listView = new ListView
2129
{
2230
RowHeight = 150,
2331
AutomationId = "listview",
24-
ItemsSource = new string[] { "Test1", "Test2", "Test3", "Test4", "Test5", "Test6", }
32+
ItemsSource = new[] { "Test1", "Test2", "Test3", "Test4", "Test5", "Test6", }
2533
};
2634

27-
Content = listView;
35+
Content = new StackLayout { Children = { instructions, listView } };
2836
}
29-
30-
#if UITEST
31-
[Test]
32-
[Category("ManualReview")]
33-
public void Bugzilla39829Test()
34-
{
35-
RunningApp.WaitForElement(q => q.Marked("listview"));
36-
RunningApp.Screenshot("If there isn't substantial space between the list items, this test has failed.");
37-
}
38-
#endif
3937
}
4038
}

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39853.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Xamarin.Forms.Controls
77
{
88
[Preserve(AllMembers = true)]
9-
[Issue(IssueTracker.Bugzilla, 39853, "BorderRadius ignored on UWP", PlatformAffected.WinRT)]
9+
[Issue(IssueTracker.Bugzilla, 39853, "BorderRadius ignored on UWP", PlatformAffected.UWP)]
1010
public class Bugzilla39853 : TestContentPage
1111
{
1212
public class RoundedButton : Xamarin.Forms.Button
@@ -24,7 +24,7 @@ public RoundedButton(int radius)
2424
BorderColor = Color.White;
2525
TextColor = Color.Purple;
2626
Text = "YAY";
27-
Image = new FileImageSource { File = "crimson.jpg" };
27+
//Image = new FileImageSource { File = "crimson.jpg" };
2828
}
2929

3030
public new int BorderRadius
@@ -79,11 +79,19 @@ public RoundedButton(int radius)
7979
#pragma warning restore
8080
}
8181
}
82-
8382
}
83+
8484
protected override void Init()
8585
{
86-
Content = new RoundedButton(100);
86+
var layout = new StackLayout();
87+
88+
var instructions = new Label { Text = "The button below should be round. "
89+
+ "If it has any right angles, the test has failed."};
90+
91+
layout.Children.Add(instructions);
92+
layout.Children.Add(new RoundedButton(100));
93+
94+
Content = layout;
8795
}
8896
}
8997
}

Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39963.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Xamarin.Forms.Controls.Issues
1212
{
1313
[Preserve(AllMembers = true)]
1414
[Issue(IssueTracker.Bugzilla, 39963, "iOS WebView has wrong scrolling size when loading local html content with images")]
15-
public class Bugzilla39963 : TestContentPage // or TestMasterDetailPage, etc ...
15+
public class Bugzilla39963 : TestContentPage
1616
{
1717
protected override void Init()
1818
{
@@ -21,19 +21,15 @@ protected override void Init()
2121
<p><img src='test.jpg' /></p>
2222
<p>After starting (not re-entering!) the app in landscape, scroll down to see a black area which is not supposed to be there.</p>
2323
<p>After starting (not re-entering!) the app in portrait, scroll to the right to see a black area which is not supposed to be there.</p>
24-
<p>This only happends when a local image is loaded.</p>
24+
<p>This only happens when a local image is loaded.</p>
2525
</body></html>";
2626

2727
var workingHtml = @"<html><body>
2828
<p></p>
2929
<p>Without local image, everything works fine.</p>
3030
</body></html>";
3131

32-
// Initialize ui here instead of ctor
3332
WebView webView = new WebView {
34-
//Source = new UrlWebViewSource {
35-
// Url = "https://blog.xamarin.com/",
36-
//},
3733
Source = new HtmlWebViewSource() {
3834
Html = notWorkingHtml
3935
},
@@ -43,15 +39,5 @@ protected override void Init()
4339

4440
Content = webView;
4541
}
46-
47-
#if UITEST
48-
[Test]
49-
public void Bugzilla39963Test()
50-
{
51-
RunningApp.Screenshot("I am at Bugzilla39963");
52-
RunningApp.SwipeRightToLeft();
53-
RunningApp.Screenshot("Do we see a black bar");
54-
}
55-
#endif
5642
}
5743
}

0 commit comments

Comments
 (0)