Agent Tests for API, MAUI, and Slop Features

This commit is contained in:
2026-06-03 19:08:35 -04:00
parent 46150d3a69
commit 0feac0f0a0
142 changed files with 4156 additions and 1462 deletions
+62 -15
View File
@@ -2,29 +2,76 @@ namespace Tests.Pages;
public class HarassCalculatorPage : BasePage
{
public HarassCalculatorPage(Website website) : base(website) { }
public HarassCalculatorPage(Website website) : base(website)
{
}
public override string Url => "harass-calculator";
public async Task SetWorkersLostToHarassAsync(int number) =>
public async Task SetWorkersLostToHarassAsync(int number)
{
await EnterAndPressAsync("numberOfWorkersLostToHarass", number);
}
public async Task SetNumberOfTownHallsExistingAsync(int number) =>
public async Task SetNumberOfTownHallsExistingAsync(int number)
{
await EnterAndPressAsync("numberOfTownHallsExisting", number);
}
public async Task SetTownHallTravelTimeAsync(int index, int seconds) =>
public async Task SetTownHallTravelTimeAsync(int index, int seconds)
{
await EnterInputAtIndexAsync("numberOfTownHallTravelTimes", index, seconds);
}
public async Task<int> GetTotalAlloyHarassmentAsync() => await ReadIntAsync("totalAlloyHarassment");
public async Task<int> GetWorkerReplacementCostAsync() => await ReadIntAsync("workerReplacementCost");
public async Task<int> GetDelayedMiningCostAsync() => await ReadIntAsync("delayedMiningCost");
public async Task<int> GetAverageTravelTimeAsync() => await ReadIntAsync("getAverageTravelTime");
public async Task<int> GetExampleTotalAlloyLossAsync() => await ReadIntAsync("exampleTotalAlloyLoss");
public async Task<int> GetExampleWorkerCostAsync() => await ReadIntAsync("exampleWorkerCost");
public async Task<int> GetExampleMiningTimeCostAsync() => await ReadIntAsync("exampleMiningTimeCost");
public async Task<int> GetExampleTotalAlloyLossAccurateAsync() => await ReadIntAsync("exampleTotalAlloyLossAccurate");
public async Task<int> GetExampleTotalAlloyLossDifferenceAsync() => await ReadIntAsync("exampleTotalAlloyLossDifference");
public async Task<int> GetExampleTotalAlloyLossAccurateDifferenceAsync() => await ReadIntAsync("exampleTotalAlloyLossAccurateDifference");
public async Task<int> GetTotalAlloyHarassmentAsync()
{
return await ReadIntAsync("totalAlloyHarassment");
}
public async Task<int> GetWorkerReplacementCostAsync()
{
return await ReadIntAsync("workerReplacementCost");
}
public async Task<int> GetDelayedMiningCostAsync()
{
return await ReadIntAsync("delayedMiningCost");
}
public async Task<int> GetAverageTravelTimeAsync()
{
return await ReadIntAsync("getAverageTravelTime");
}
public async Task<int> GetExampleTotalAlloyLossAsync()
{
return await ReadIntAsync("exampleTotalAlloyLoss");
}
public async Task<int> GetExampleWorkerCostAsync()
{
return await ReadIntAsync("exampleWorkerCost");
}
public async Task<int> GetExampleMiningTimeCostAsync()
{
return await ReadIntAsync("exampleMiningTimeCost");
}
public async Task<int> GetExampleTotalAlloyLossAccurateAsync()
{
return await ReadIntAsync("exampleTotalAlloyLossAccurate");
}
public async Task<int> GetExampleTotalAlloyLossDifferenceAsync()
{
return await ReadIntAsync("exampleTotalAlloyLossDifference");
}
public async Task<int> GetExampleTotalAlloyLossAccurateDifferenceAsync()
{
return await ReadIntAsync("exampleTotalAlloyLossAccurateDifference");
}
private async Task EnterAndPressAsync(string id, int value)
{
@@ -45,4 +92,4 @@ public class HarassCalculatorPage : BasePage
var text = await Website.FindById(id).TextContentAsync() ?? "";
return int.Parse(text.Trim());
}
}
}