various bug fixes (#1010)

* various bug fixes

* use 'remove favorite' label where appropriate

* fix toggle favorite component labels

* e2e type check and fixes

* favorite library label

* support toggle favorite component selectors

* update tests

* update e2e tests

* update e2e

* e2e update

* update e2e
This commit is contained in:
Denys Vuika
2019-03-14 15:40:38 +00:00
committed by GitHub
parent becd71adff
commit 07f45e08cf
18 changed files with 218 additions and 171 deletions

View File

@@ -44,12 +44,16 @@ import { Router } from '@angular/router';
[attr.title]="
favoriteLibrary.isFavorite()
? ('APP.ACTIONS.REMOVE_FAVORITE' | translate)
: ('APP.ACTIONS.ADD_FAVORITE' | translate)
: ('APP.ACTIONS.FAVORITE' | translate)
"
>
<mat-icon *ngIf="favoriteLibrary.isFavorite()">star</mat-icon>
<mat-icon *ngIf="!favoriteLibrary.isFavorite()">star_border</mat-icon>
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
<span>{{
(favoriteLibrary.isFavorite()
? 'APP.ACTIONS.REMOVE_FAVORITE'
: 'APP.ACTIONS.FAVORITE') | translate
}}</span>
</button>
`,
encapsulation: ViewEncapsulation.None,

View File

@@ -42,7 +42,11 @@ import { ReloadDocumentListAction } from '../../../store/actions';
>
<mat-icon *ngIf="favorites.hasFavorites()">star</mat-icon>
<mat-icon *ngIf="!favorites.hasFavorites()">star_border</mat-icon>
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
<span>{{
(favorites.hasFavorites()
? 'APP.ACTIONS.REMOVE_FAVORITE'
: 'APP.ACTIONS.FAVORITE') | translate
}}</span>
</button>
`,
encapsulation: ViewEncapsulation.None,