Files
2026-05-31 14:33:58 -04:00

36 lines
821 B
JavaScript

class BuildChartComponent {
constructor(page) {
this.page = page;
}
chartsContainer() {
return this.page.locator('.chartsContainer');
}
displayValue(label) {
return this.page.locator('.displayContainer').filter({ hasText: label }).locator('.displayContent');
}
async getHighestAlloy() {
return await this.displayValue('Highest Alloy').textContent();
}
async getHighestEther() {
return await this.displayValue('Highest Ether').textContent();
}
async getHighestPyre() {
return await this.displayValue('Highest Pyre').textContent();
}
async getHighestArmy() {
return await this.displayValue('Highest Army').textContent();
}
async getChartCount() {
return await this.chartsContainer().locator('> div').count();
}
}
module.exports = BuildChartComponent;