Skip to content

Commit

Permalink
Better test case names
Browse files Browse the repository at this point in the history
  • Loading branch information
KarmaKamikaze committed Nov 13, 2023
1 parent 3258e26 commit b10f271
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion ChatRPGTests/ChatRPGFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public async Task InitializeAsync()

public async Task DisposeAsync()
{
// Stop the app when the tests are done
if (!_appProcess!.HasExited)
{
_appProcess.Kill();
Expand Down
1 change: 1 addition & 0 deletions ChatRPGTests/E2ETestUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static void Teardown(IWebDriver driver)
catch
{
// Was not logged in or unable to log out
// We do not care if it fails during teardown
}

driver.Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
namespace ChatRPGTests;

[Collection("E2E collection")]
public class IndexE2ETests : IDisposable
public class UnauthorizedIndexE2ETests : IDisposable
{
private readonly ChatRPGFixture _fixture;
private readonly IWebDriver _driver;
private readonly WebDriverWait _wait;

public IndexE2ETests(ChatRPGFixture fixture)
public UnauthorizedIndexE2ETests(ChatRPGFixture fixture)
{
_fixture = fixture;
_driver = E2ETestUtility.Setup("/");
_wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(10));
}

[Fact]
public void IndexPage_ContainsTitleText()
public void UnauthorizedIndexPage_ContainsTitleText()
{
// Arrange
string expectedTitle = "ChatRPG";
Expand All @@ -32,7 +32,7 @@ public void IndexPage_ContainsTitleText()
}

[Fact]
public void IndexPage_ContainsSloganText()
public void UnauthorizedIndexPage_ContainsSloganText()
{
// Arrange
string expectedSlogan = "Immerse yourself in the ultimate AI-powered adventure!";
Expand All @@ -46,7 +46,7 @@ public void IndexPage_ContainsSloganText()
}

[Fact]
public void IndexPage_ContainsLoginButton()
public void UnauthorizedIndexPage_ContainsLoginButton()
{
Thread.Sleep(1000); // wait for typing animation to finish
// Act
Expand All @@ -57,7 +57,7 @@ public void IndexPage_ContainsLoginButton()
}

[Fact]
public void IndexPage_ContainsRegisterButton()
public void UnauthorizedIndexPage_ContainsRegisterButton()
{
Thread.Sleep(1000); // wait for typing animation to finish
// Act
Expand All @@ -68,7 +68,7 @@ public void IndexPage_ContainsRegisterButton()
}

[Fact]
public void PressingLoginButton_ShouldRedirectToLoginPage()
public void UnauthorizedIndexPage_PressingLoginButton_ShouldRedirectToLoginPage()
{
Thread.Sleep(1000); // wait for typing animation to finish
// Act
Expand All @@ -81,7 +81,7 @@ public void PressingLoginButton_ShouldRedirectToLoginPage()
}

[Fact]
public void PressingRegisterButton_ShouldRedirectToRegisterPage()
public void UnauthorizedIndexPage_PressingRegisterButton_ShouldRedirectToRegisterPage()
{
Thread.Sleep(1000); // wait for typing animation to finish
// Act
Expand Down

0 comments on commit b10f271

Please sign in to comment.