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,33 @@
class EntityClickViewComponent {
constructor(page) {
this.page = page;
}
entityClickView() {
return this.page.locator('.entityClickView');
}
async getEntityName() {
const el = this.entityClickView().locator('#entityName');
if ((await el.count()) === 0) return null;
return (await el.textContent()) || '';
}
async getEntityHealth() {
const healthText = this.entityClickView().locator('div').filter({ hasText: /Health/i }).first();
if ((await healthText.count()) === 0) return null;
const text = (await healthText.textContent()) || '';
const match = text.match(/(\d+)/);
return match ? match[1] : null;
}
async clickDetailedView() {
await this.entityClickView().locator('button').filter({ hasText: 'Detailed' }).click();
}
async clickPlainView() {
await this.entityClickView().locator('button').filter({ hasText: 'Plain' }).click();
}
}
module.exports = EntityClickViewComponent;