Skip to content

Commit

Permalink
- simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed Apr 24, 2024
1 parent d97adbf commit b942a6f
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 102 deletions.
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/BorderUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(BorderGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

// TODO: Enable this as a test once fully working
//[Test]
//[Category(UITestCategories.Border)]
Expand Down
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/CarouselViewUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(CarouselViewGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
[Category(UITestCategories.CarouselView)]
public async Task CarouselViewSetPosition()
Expand Down
14 changes: 0 additions & 14 deletions src/Controls/tests/UITests/Tests/CoreGalleryBasePageTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@ protected override void FixtureSetup()
}
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
try
{
this.Reset();
}
catch (Exception e)
{
var name = TestContext.CurrentContext.Test.MethodName ?? TestContext.CurrentContext.Test.Name;
TestContext.Error.WriteLine($">>>>> {DateTime.Now} The FixtureTeardown threw an exception during {name}.{Environment.NewLine}Exception details: {e}");
}
}

protected abstract void NavigateToGallery();
}
}
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/DragAndDropUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(DragAndDropGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
[Category(UITestCategories.Gestures)]
public void DragEvents()
Expand Down
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/GestureRecognizerUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(GestureRecognizerGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
[Category(UITestCategories.Gestures)]
public void PointerGestureTest()
Expand Down
14 changes: 0 additions & 14 deletions src/Controls/tests/UITests/Tests/Issues/_IssuesUITest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@ protected override void FixtureSetup()
}
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
try
{
Reset();
}
catch (Exception e)
{
var name = TestContext.CurrentContext.Test.MethodName ?? TestContext.CurrentContext.Test.Name;
TestContext.Error.WriteLine($">>>>> {DateTime.Now} The FixtureTeardown threw an exception during {name}.{Environment.NewLine}Exception details: {e}");
}
}

public abstract string Issue { get; }

private void NavigateToIssue(string issue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(KeyboardScrollingGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
public void GridStarRowScrollingTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(KeyboardScrollingGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
public void EntriesScrollingPageTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(KeyboardScrollingGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

// [Test]
// public void EntriesScrollingPageTest()
// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(KeyboardScrollingGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

// [Test]
// public void EntriesScrollingPageTest()
// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(KeyboardScrollingGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

// [Test]
// public void EntriesScrollingPageTest()
// {
Expand Down
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/ScrollViewUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(LayoutGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
[Category(UITestCategories.ScrollView)]
[Description("Scroll element to the start")]
Expand Down
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/SliderUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(SliderGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
[Category(UITestCategories.Slider)]
[Description("Set different slider values")]
Expand Down
6 changes: 0 additions & 6 deletions src/Controls/tests/UITests/Tests/SwipeViewUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ protected override void FixtureSetup()
App.NavigateToGallery(ScrollViewGallery);
}

protected override void FixtureTeardown()
{
base.FixtureTeardown();
this.Back();
}

[Test]
[Category(UITestCategories.SwipeView)]
[Description("Swipe to right the SwipeView")]
Expand Down
11 changes: 9 additions & 2 deletions src/TestUtils/src/UITest.NUnit/UITestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,15 @@ protected virtual void FixtureSetup()

protected virtual void FixtureTeardown()
{
var name = TestContext.CurrentContext.Test.MethodName ?? TestContext.CurrentContext.Test.Name;
TestContext.Progress.WriteLine($">>>>> {DateTime.Now} {nameof(FixtureTeardown)} for {name}");
try
{
Reset();
}
catch (Exception e)
{
var name = TestContext.CurrentContext.Test.MethodName ?? TestContext.CurrentContext.Test.Name;
TestContext.Error.WriteLine($">>>>> {DateTime.Now} The FixtureTeardown threw an exception during {name}.{Environment.NewLine}Exception details: {e}");
}
}

[TearDown]
Expand Down

0 comments on commit b942a6f

Please sign in to comment.