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

Commit

Permalink
UITest ExpanderView (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuidoNeele authored and AndreiMisiukevich committed Mar 11, 2020
1 parent ab86f93 commit 3cd8fcb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Xamarin.Forms.Core.UITests.Shared/Tests/ExpanderViewUITests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using NUnit.Framework;

namespace Xamarin.Forms.Core.UITests
{
[Category(UITestCategories.ExpanderView)]
internal class ExpanderViewUITests : BaseTestFixture
{
protected override void NavigateToGallery()
{
App.NavigateToGallery("* marked:'Expander Gallery'");
}

[TestCase]
public void ExpanderView()
{
App.WaitForElement("The Second", "");
App.Tap("Expander Level 2");
App.WaitForElement("Hi, I am Red", "View didn't expand the second level");
App.Tap("The Fourth");

App.WaitForNoElement("Hi, I am Red", "View didn't collapse like is should");

App.WaitForElement("Expander Level 2", "Fourth view didn't expand to show 'Expander level 2'");
App.Tap("Expander Level 2");
App.WaitForElement("Hi, I am Red", "Expander level 2 of Fourth view didn't expand like it should.");
App.Tap("Expander Level 2");

App.WaitForNoElement("Hi, I am Red", "View didn't collapse like is should");

App.Tap("The Fourth");

App.WaitForNoElement("Expander Level 2", "View didn't collapse like is should");

App.Back();
}
}
}
1 change: 1 addition & 0 deletions Xamarin.Forms.Core.UITests.Shared/UITestCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ internal static class UITestCategories
public const string DisplayAlert = "DisplayAlert";
public const string Editor = "Editor";
public const string Entry = "Entry";
public const string ExpanderView = "ExpanderView";
public const string Frame = "Frame";
public const string Image = "Image";
public const string ImageButton = "ImageButton";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Tests\DisplayAlertUITests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tests\EditorUITests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tests\EntryUITests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tests\ExpanderViewUITests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tests\FrameUITests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tests\ImageButtonUITests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tests\ImageUITests.cs" />
Expand Down

0 comments on commit 3cd8fcb

Please sign in to comment.