[ADF-5158] ECM Version Directive (#5779)

* [ADF-5158] ECM Version Directive

* Update version-compatibility.directive.ts

* Update version-compatibility.directive.ts

* Change name from ecm to acs

* Fix unit tests

* Update docs for Version directive

* Fix unit tests

* Fix unit tests

* Linting

* Update apps-process-cloud.service.spec.ts

* Fix Ecm Service initialization

* Fix unit test

Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
davidcanonieto
2020-06-23 08:46:17 +01:00
committed by GitHub
parent 1daffc050c
commit 46e4daeef3
17 changed files with 432 additions and 22 deletions

View File

@@ -24,7 +24,6 @@ import { Subject } from 'rxjs';
import { TranslateModule } from '@ngx-translate/core';
import { UserPreferencesService } from '../services/user-preferences.service';
import { setupTestBed } from '../testing/setup-test-bed';
import { CoreModule } from '../core.module';
describe('SearchTextInputComponent', () => {
@@ -37,7 +36,6 @@ describe('SearchTextInputComponent', () => {
setupTestBed({
imports: [
TranslateModule.forRoot(),
CoreModule.forRoot(),
CoreTestingModule
]
});
@@ -58,6 +56,7 @@ describe('SearchTextInputComponent', () => {
describe('component rendering', () => {
it('should display a search input field when specified', async(() => {
fixture.detectChanges();
component.inputType = 'search';
fixture.detectChanges();
expect(element.querySelectorAll('input[type="search"]').length).toBe(1);
@@ -68,15 +67,17 @@ describe('SearchTextInputComponent', () => {
beforeEach(() => {
component.expandable = false;
fixture.detectChanges();
});
it('search button should be hide', () => {
fixture.detectChanges();
const searchButton: any = element.querySelector('#adf-search-button');
expect(searchButton).toBe(null);
});
it('should not have animation', () => {
userPreferencesService.setWithoutStore('textOrientation', 'rtl');
fixture.detectChanges();
expect(component.subscriptAnimationState.value).toBe('no-animation');
});
});