Playwright start

This commit is contained in:
2026-05-30 10:04:12 -04:00
parent 73f29cea08
commit 1f7a0819fc
108 changed files with 37445 additions and 62 deletions
+68
View File
@@ -0,0 +1,68 @@
const BasePage = require('./base.page');
class HarassCalculatorPage extends BasePage {
get url() { return 'harass-calculator'; }
async setWorkersLostToHarass(number) {
await this.website.enterInput(this.website.find('numberOfWorkersLostToHarass'), number);
return this;
}
async setNumberOfTownHallsExisting(number) {
await this.website.enterInput(this.website.find('numberOfTownHallsExisting'), number);
return this;
}
async setTownHallTravelTime(forTownHall, number) {
const inputs = this.website.findChildren('numberOfTownHallTravelTimes', 'input');
await this.website.enterInput(inputs.nth(forTownHall), number);
return this;
}
async getTotalAlloyHarassment() {
return await this.website.findInt('totalAlloyHarassment');
}
async getWorkerReplacementCost() {
return await this.website.findInt('workerReplacementCost');
}
async getDelayedMiningCost() {
return await this.website.findInt('delayedMiningCost');
}
async getAverageTravelTime() {
return await this.website.findInt('getAverageTravelTime');
}
async getExampleTotalAlloyLoss() {
return await this.website.findInt('exampleTotalAlloyLoss');
}
async getExampleWorkerCost() {
return await this.website.findInt('exampleWorkerCost');
}
async getExampleMiningTimeCost() {
return await this.website.findInt('exampleMiningTimeCost');
}
async getExampleTotalAlloyLossAccurate() {
return await this.website.findInt('exampleTotalAlloyLossAccurate');
}
async getExampleTotalAlloyLossDifference() {
return await this.website.findInt('exampleTotalAlloyLossDifference');
}
async getExampleTotalAlloyLossAccurateDifference() {
return await this.website.findInt('exampleTotalAlloyLossAccurateDifference');
}
async goto() {
await this.website.goto(this.url);
return this;
}
}
module.exports = HarassCalculatorPage;