namespace Tests.Pages;

public class DatabaseSinglePage : BasePage
{
    public DatabaseSinglePage(Website website) : base(website)
    {
    }

    public override string Url => "database";

    public async Task GotoWithSearchAsync(string searchText)
    {
        await Website.GotoAsync($"{Url}/{searchText}");
    }

    public async Task<string> GetEntityNameAsync()
    {
        return (await Website.FindById("entityName").InnerTextAsync()).Trim();
    }

    public async Task<string> GetEntityHealthAsync()
    {
        return (await Website.FindById("entityHealth").InnerTextAsync()).Trim();
    }

    public async Task<string> GetInvalidSearchAsync()
    {
        return (await Website.FindById("invalidSearch").InnerTextAsync()).Trim();
    }

    public async Task<string> GetValidSearchAsync()
    {
        return (await Website.FindById("validSearch").InnerTextAsync()).Trim();
    }
}