using NUnit.Framework;
using AOW4.SeleniumTests.Pages;

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, System.StringComparison.OrdinalIgnoreCase) || Driver.PageSource.Contains(linkText),
            $"Expected to be on route containing '{expectedPath}' after clicking '{linkText}', but was '{Driver.Url}'");
    }
}
