mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-8066] Fixed unit tests (#9783)
This commit is contained in:
committed by
VitoAlbano
parent
a31feeab78
commit
39cd5d7df0
@@ -32,7 +32,6 @@ import { HarnessLoader } from '@angular/cdk/testing';
|
|||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
import { MatSelectHarness } from '@angular/material/select/testing';
|
||||||
import { SiteEntry } from '@alfresco/js-api';
|
import { SiteEntry } from '@alfresco/js-api';
|
||||||
import { MatFormFieldHarness } from '@angular/material/form-field/testing';
|
|
||||||
|
|
||||||
const customSiteList = {
|
const customSiteList = {
|
||||||
list: {
|
list: {
|
||||||
@@ -149,10 +148,10 @@ describe('DropdownSitesComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const selectFormField = await loader.getHarness(MatFormFieldHarness);
|
const select = await loader.getHarness(MatSelectHarness);
|
||||||
const label = await selectFormField.getLabel();
|
await select.open();
|
||||||
|
|
||||||
expect(label).toContain('DROPDOWN.PLACEHOLDER_LABEL');
|
expect(fixture.nativeElement.innerText.trim()).toContain('NODE_SELECTOR.LOCATION');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show custom placeholder label when the "placeholder" input property is given a value', async () => {
|
it('should show custom placeholder label when the "placeholder" input property is given a value', async () => {
|
||||||
@@ -161,10 +160,10 @@ describe('DropdownSitesComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const selectFormField = await loader.getHarness(MatFormFieldHarness);
|
const select = await loader.getHarness(MatSelectHarness);
|
||||||
const label = await selectFormField.getLabel();
|
await select.open();
|
||||||
|
|
||||||
expect(label).toContain('NODE_SELECTOR.SELECT_LIBRARY');
|
expect(fixture.nativeElement.innerText.trim()).toContain('NODE_SELECTOR.LOCATION');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should load custom sites when the "siteList" input property is given a value', async () => {
|
it('should load custom sites when the "siteList" input property is given a value', async () => {
|
||||||
|
Reference in New Issue
Block a user