1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
using Xamarin.Forms.CustomAttributes;
#if UITEST
using NUnit.Framework;
using Xamarin.UITest;
#endif
namespace Xamarin.Forms.Controls
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 181, "Color not initialized for Label", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
public class Issue181 : TestContentPage
{
protected override void Init ()
{
Title = "Issue 181";
Content = new Frame {
OutlineColor = Color.Red,
BackgroundColor = new Color (1.0, 1.0, 0.0),
Content = new Label {
Text = "I should have red text",
TextColor = Color.Red,
BackgroundColor = new Color (0.5, 0.5, 0.5),
XAlign = TextAlignment.Center,
YAlign = TextAlignment.Center
}
};
}
#if UITEST
[Test]
[Category ("ManualReview")]
[UiTest (typeof(Label), "TextColor")]
public void Issue181TestsLabelShouldHaveRedText ()
{
RunningApp.WaitForElement (q => q.Marked ("I should have red text"));
RunningApp.Screenshot ("Label should have red text");
}
#endif
}
}
|