import { by , browser } from 'protractor' ; import { Component } from '../component' ; import { SizeFilter } from './filters/size-filter' ; import { CreatedDateFilter } from './filters/created-date-filter' ; import { FacetFilter } from './filters/facet-filter' ; import { isPresentAndDisplayed } from '../../utilities/utils' ; export class SearchFilters extends Component { mainPanel = browser . element ( by . css ( 'adf-search-filter' ) ) ; resetAllButton = browser . element ( by . css ( 'button[adf-reset-search]' ) ) ; size = new SizeFilter ( ) ; createdDate = new CreatedDateFilter ( ) ; fileType = new FacetFilter ( 'File type' ) ; creator = new FacetFilter ( 'Creator' ) ; modifier = new FacetFilter ( 'Modifier' ) ; location = new FacetFilter ( 'Location' ) ; modifiedDate = new FacetFilter ( 'Modified date' ) ; constructor ( ancestor ? ) { super ( 'adf-search-filter' , ancestor ) ; } async isSearchFiltersPanelDisplayed ( ) { return isPresentAndDisplayed ( this . mainPanel ) ; } }