test(Discord) Added test logs to discord and start of discord chat bot

This commit is contained in:
2022-04-28 12:56:49 -04:00
parent 156339786c
commit b65dae0884
25 changed files with 6277 additions and 181 deletions
+3 -5
View File
@@ -1,13 +1,11 @@
using OpenQA.Selenium;
using TestAutomation.Utils;
namespace TestAutomation.Pages;
namespace TestAutomation.Pages;
public class BasePage {
public Website website;
public Website website;
public BasePage(Website website) {
this.website = website;
}
}
+17 -15
View File
@@ -1,14 +1,17 @@
namespace TestAutomation.Pages;
using TestAutomation.Utils;
namespace TestAutomation.Pages;
public class HarassCalculatorPage : BasePage {
public HarassCalculatorPage(Website website) : base(website) { }
private IWebElement NumberOfWorkersLostToHarass => website.Find("numberOfWorkersLostToHarass");
private IWebElement NumberOfTownHallsExisting => website.Find("numberOfTownHallsExisting");
private IList<IWebElement> OnTownHallTravelTimes => website.FindChildren("numberOfTownHallTravelTimes", "input");
private IWebElement NumberOfTownHallsExisting => website.Find("numberOfTownHallsExisting");
private IList<IWebElement> OnTownHallTravelTimes => website.FindChildren("numberOfTownHallTravelTimes", "input");
private int TotalAlloyHarassment => website.FindInt("totalAlloyHarassment");
private int WorkerReplacementCost => website.FindInt("workerReplacementCost");
private int WorkerReplacementCost => website.FindInt("workerReplacementCost");
private int DelayedMiningCost => website.FindInt("delayedMiningCost");
private int AverageTravelTime => website.FindInt("getAverageTravelTime");
private int AverageTravelTime => website.FindInt("getAverageTravelTime");
private int ExampleTotalAlloyLoss => website.FindInt("exampleTotalAlloyLoss");
private int ExampleWorkerCost => website.FindInt("exampleWorkerCost");
private int ExampleMiningTimeCost => website.FindInt("exampleMiningTimeCost");
@@ -16,29 +19,27 @@ public class HarassCalculatorPage : BasePage {
private int ExampleTotalAlloyLossAccurate => website.FindInt("exampleTotalAlloyLossAccurate");
private int ExampleTotalAlloyLossAccurateDifference => website.FindInt("exampleTotalAlloyLossAccurateDifference");
public HarassCalculatorPage(Website website) : base(website) { }
public HarassCalculatorPage SetWorkersLostToHarass(int number) {
website.EnterInput(NumberOfWorkersLostToHarass, number);
return this;
}
public HarassCalculatorPage SetNumberOfTownHallsExisting(int number) {
website.EnterInput(NumberOfTownHallsExisting, number);
return this;
}
public HarassCalculatorPage SetTownHallTravelTime(int forTownHall, int number) {
website.EnterInput(OnTownHallTravelTimes[forTownHall], number);
return this;
}
public HarassCalculatorPage GetTotalAlloyHarassment(out int result) {
result = TotalAlloyHarassment;
return this;
}
public HarassCalculatorPage GetExampleTotalAlloyLoss(out int result) {
result = ExampleTotalAlloyLoss;
return this;
@@ -53,18 +54,19 @@ public class HarassCalculatorPage : BasePage {
result = ExampleMiningTimeCost;
return this;
}
public HarassCalculatorPage GetExampleTotalAlloyLossAccurate(out int result) {
result = ExampleTotalAlloyLossAccurate;
return this;
}
public HarassCalculatorPage GetExampleTotalAlloyLossDifference(out int result) {
result = ExampleTotalAlloyLossDifference;
return this;
}
public HarassCalculatorPage GetExampleTotalAlloyLossAccurateDifference(out int result) {
result = ExampleTotalAlloyLossAccurateDifference;
return this;
}
}