18 lines
578 B
C#
18 lines
578 B
C#
using NUnit.Framework;
|
|
|
|
namespace AOW4.SeleniumTests.Tests;
|
|
|
|
[TestFixture]
|
|
public class NavigationTests : BaseTest
|
|
{
|
|
[TestCase("Building Plan Calculator", "/building-calculator")]
|
|
public void ClickNavLink_NavigatesToPage(string linkText, string expectedPath)
|
|
{
|
|
GoHome();
|
|
|
|
Assert.IsTrue(
|
|
Driver.Url.Contains(expectedPath, StringComparison.OrdinalIgnoreCase) ||
|
|
Driver.PageSource.Contains(linkText),
|
|
$"Expected to be on route containing '{expectedPath}' after clicking '{linkText}', but was '{Driver.Url}'");
|
|
}
|
|
} |