Skip to content

Commit

Permalink
[ACS-8066] Fixed unit tests (#9783)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz authored and VitoAlbano committed Jun 25, 2024
1 parent 46ad205 commit 372a914
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatSelectHarness } from '@angular/material/select/testing';
import { SiteEntry } from '@alfresco/js-api';
import { MatFormFieldHarness } from '@angular/material/form-field/testing';

const customSiteList = {
list: {
Expand Down Expand Up @@ -149,10 +148,10 @@ describe('DropdownSitesComponent', () => {
fixture.detectChanges();
await fixture.whenStable();

const selectFormField = await loader.getHarness(MatFormFieldHarness);
const label = await selectFormField.getLabel();
const select = await loader.getHarness(MatSelectHarness);
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 () => {
Expand All @@ -161,10 +160,10 @@ describe('DropdownSitesComponent', () => {
fixture.detectChanges();
await fixture.whenStable();

const selectFormField = await loader.getHarness(MatFormFieldHarness);
const label = await selectFormField.getLabel();
const select = await loader.getHarness(MatSelectHarness);
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 () => {
Expand Down

0 comments on commit 372a914

Please sign in to comment.