import { Component } from '../component' ; export class Breadcrumb extends Component { items = this . allByCss ( '.adf-breadcrumb-item' ) ; currentItem = this . byCss ( '.adf-breadcrumb-item-current' ) ; constructor ( ancestor ? ) { super ( 'adf-breadcrumb' , ancestor ) ; } async getAllItems ( ) { return this . items . map ( async ( elem ) => { const str = await elem . getText ( ) ; return str . split ( '\nchevron_right' ) [ 0 ] ; } ) ; } async clickItem ( name ) { const elem = this . byCss ( `.adf-breadcrumb-item[title=${ name }]` ) ; await elem . click ( ) ; } }