import { FtrService } from '../ftr_provider_context' ; export class MonitoringPageObject extends FtrService { private readonly common = this . ctx . getPageObject ( 'common' ) ; private readonly header = this . ctx . getPageObject ( 'header' ) ; private readonly testSubjects = this . ctx . getService ( 'testSubjects' ) ; async getAccessDeniedMessage ( ) { return this . testSubjects . getVisibleText ( 'accessDeniedTitle' ) ; } async closeAlertsModal ( ) { return this . testSubjects . click ( 'alerts-modal-remind-later-button' ) ; } async clickBreadcrumb ( subj ) { return this . testSubjects . click ( subj ) ; } async assertTableNoData ( subj ) { if ( ! ( await this . testSubjects . exists ( subj ) ) ) { throw new Error ( 'Expected to find the no data message' ) ; } } async tableGetRows ( subj ) { const table = await this . testSubjects . find ( subj ) ; return table . findAllByTagName ( 'tr' ) ; } async tableGetRowsFromContainer ( subj ) { const table = await this . testSubjects . find ( subj ) ; const tbody = await table . findByTagName ( 'tbody' ) ; return tbody . findAllByTagName ( 'tr' ) ; } async tableSetFilter ( subj , text ) { await this . testSubjects . setValue ( subj , text ) ; await this . common . pressEnterKey ( ) ; await this . header . waitUntilLoadingHasFinished ( ) ; } async tableClearFilter ( subj ) { return await this . testSubjects . setValue ( subj , ' \uE003' ) ; } }