import { browser , by , element } from 'protractor' ; export class FacetContainerPage { async getPage ( ) { await browser . get ( '#/facet-container' ) ; } container = element ( by . id ( 'container1' ) ) ; addFacet = element ( by . id ( 'button1' ) ) ; getNumberOfFacets ( ) { return this . container . $ ( 'div.facets-selected-container' ) . $ ( 'div.facets-selected-list' ) . $$ ( 'div.facet-selected-tag' ) . count ( ) ; } getClearAllButton ( ) { return this . container . $ ( 'div.facets-selected-container' ) . $ ( 'div.facets-selected-header-container' ) . $ ( '.btn.btn-link' ) ; } getFacet ( index ) { return this . container . $ ( 'div.facets-selected-container' ) . $ ( 'div.facets-selected-list' ) . $$ ( 'div.facet-selected-tag' ) . get ( index ) ; } getFacetName ( index ) { return this . container . $ ( 'div.facets-selected-container' ) . $ ( 'div.facets-selected-list' ) . $$ ( 'div.facet-selected-tag' ) . get ( index ) . $ ( 'span.facet-selected-tag-label' ) . getText ( ) ; } async closeFacet ( index ) { await this . container . $ ( 'div.facets-selected-container' ) . $ ( 'div.facets-selected-list' ) . $$ ( 'div.facet-selected-tag' ) . get ( index ) . $ ( '.facet-selected-remove-btn' ) . click ( ) ; } getNoItemsLabel ( ) { return this . container . $ ( 'div.facets-selected-container' ) . $ ( 'p.facets-selected-none-label' ) ; } }