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,39 @@
class HighlightsComponent {
constructor(page) {
this.page = page;
}
highlightsContainer() {
return this.page.locator('.highlightsContainer');
}
requestedColumn() {
return this.highlightsContainer().locator('div').filter({ hasText: 'Requested' }).locator('+ div');
}
finishedColumn() {
return this.highlightsContainer().locator('div').filter({ hasText: 'Finished' }).locator('+ div');
}
async getRequestedItems() {
const items = await this.highlightsContainer().locator('div').filter({ hasText: /^\d+\s*\|/ }).all();
const result = [];
for (const item of items) {
const text = (await item.textContent()) || '';
result.push(text.trim());
}
return result;
}
async getFinishedItems() {
const items = await this.highlightsContainer().locator('div').filter({ hasText: /^\d+\s*\|/ }).all();
const result = [];
for (const item of items) {
const text = (await item.textContent()) || '';
result.push(text.trim());
}
return result;
}
}
module.exports = HighlightsComponent;