E2E for multiselect facet search (#3657)

This commit is contained in:
marouanbentaleb
2018-08-07 12:14:29 +01:00
committed by Eugenio Romano
parent 6b24bfb1d4
commit 68779e0426
3 changed files with 360 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
<mat-expansion-panel
*ngFor="let category of queryBuilder.categories"
[attr.data-automation-id]="'expansion-panel-'+category.name"
[(expanded)]="category.expanded">
<mat-expansion-panel-header>
<mat-panel-title>
@@ -16,7 +17,7 @@
</mat-expansion-panel>
<ng-container *ngIf="responseFacetQueries">
<mat-expansion-panel [expanded]="facetQueriesExpanded">
<mat-expansion-panel [expanded]="facetQueriesExpanded" [attr.data-automation-id]="'expansion-panel-'+facetQueriesLabel">
<mat-expansion-panel-header>
<mat-panel-title>{{ facetQueriesLabel | translate }}</mat-panel-title>
</mat-expansion-panel-header>
@@ -25,6 +26,7 @@
<input
matInput
placeholder="{{ 'SEARCH.FILTER.ACTIONS.FILTER-CATEGORY' | translate }}"
[attr.data-automation-id]="'facet-result-filter-'+facetQueriesLabel"
[(ngModel)]="responseFacetQueries.filterText">
<button *ngIf="responseFacetQueries.filterText"
mat-button matSuffix mat-icon-button
@@ -37,6 +39,7 @@
<ng-container *ngFor="let query of responseFacetQueries">
<mat-checkbox
[checked]="query.checked"
[attr.data-automation-id]="'checkbox-'+facetQueriesLabel+'-'+query.label"
(change)="onToggleFacetQuery($event, query)">
{{ query.label }} ({{ query.count }})
</mat-checkbox>
@@ -66,7 +69,7 @@
</ng-container>
<ng-container *ngIf="responseFacetFields">
<mat-expansion-panel *ngFor="let field of responseFacetFields">
<mat-expansion-panel [attr.data-automation-id]="'expansion-panel-'+field.label" *ngFor="let field of responseFacetFields">
<mat-expansion-panel-header>
<mat-panel-title>{{ field.label }}</mat-panel-title>
</mat-expansion-panel-header>
@@ -76,6 +79,7 @@
<input
matInput
placeholder="{{ 'SEARCH.FILTER.ACTIONS.FILTER-CATEGORY' | translate }}"
[attr.data-automation-id]="'facet-result-filter-'+field.label"
[(ngModel)]="field.buckets.filterText">
<button *ngIf="field.buckets.filterText"
mat-button matSuffix mat-icon-button
@@ -89,6 +93,7 @@
<mat-checkbox
*ngFor="let bucket of field.buckets"
[checked]="bucket.checked"
[attr.data-automation-id]="'checkbox-'+field.label+'-'++(bucket.display || bucket.label)"
(change)="onToggleBucket($event, field, bucket)">
{{ bucket.display || bucket.label }} ({{ bucket.count }})
</mat-checkbox>