blob: 36dd3a1443b8ad3c965e889f86c60c3d9274046b (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.Forms.CustomAttributes;
using Xamarin.UITest.Queries;
namespace Xamarin.Forms.Core.UITests
{
[TestFixture]
[Category(UITestCategories.ActivityIndicator)]
internal class ActivityIndicatorUITests : _ViewUITests
{
public ActivityIndicatorUITests ()
{
PlatformViewType = Views.ActivityIndicator;
}
protected override void NavigateToGallery ()
{
App.NavigateToGallery (GalleryQueries.ActivityIndicatorGallery);
}
// View tests
[UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
public override void _Focus () {}
public override void _GestureRecognizers ()
{
// TODO Can implement this
var remote = new ViewContainerRemote (App, Test.View.GestureRecognizers, PlatformViewType);
remote.GoTo ();
}
[UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
public override void _IsEnabled () {}
[UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
public override void _IsFocused () {}
[UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
public override void _UnFocus () {}
// ActivityIndicator tests
[Test]
[UiTest (typeof(ActivityIndicator), "IsRunning")]
public void IsRunning ()
{
var remote = new ViewContainerRemote (App, Test.ActivityIndicator.IsRunning, PlatformViewType);
remote.GoTo ();
var isRunning = remote.GetProperty<bool> (ActivityIndicator.IsRunningProperty);
Assert.IsTrue (isRunning);
}
protected override void FixtureTeardown ()
{
App.NavigateBack ();
base.FixtureTeardown ();
}
}
}
|