17 lines
363 B
JavaScript
17 lines
363 B
JavaScript
class TimelineComponent {
|
|
constructor(page) {
|
|
this.page = page;
|
|
}
|
|
|
|
container() {
|
|
return this.page.locator('.calculatorGrid > div').filter({ hasText: 'Timeline highlights' });
|
|
}
|
|
|
|
async containsEntity(name) {
|
|
const text = (await this.container().textContent()) || '';
|
|
return text.includes(name);
|
|
}
|
|
}
|
|
|
|
module.exports = TimelineComponent;
|