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
@@ -0,0 +1,47 @@
class BankComponent {
constructor(page) {
this.page = page;
}
bankContainer() {
return this.page.locator('.bankContainer');
}
displayValue(label) {
return this.bankContainer().locator('.displayContainer').filter({ hasText: label }).locator('.displayContent');
}
async getTime() {
return await this.displayValue('Time').textContent();
}
async getAlloy() {
return await this.displayValue('Alloy').textContent();
}
async getEther() {
return await this.displayValue('Ether').textContent();
}
async getPyre() {
return await this.displayValue('Pyre').textContent();
}
async getSupply() {
return await this.displayValue('Supply').textContent();
}
async getWorkerCount() {
return await this.bankContainer().locator('.workerText').locator('.displayContent').nth(0).textContent();
}
async getBusyWorkerCount() {
return await this.bankContainer().locator('.workerText').locator('.displayContent').nth(1).textContent();
}
async getCreatingWorkerCount() {
return await this.bankContainer().locator('.workerText').locator('.displayContent').nth(2).textContent();
}
}
module.exports = BankComponent;