mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Fixed after rebase
This commit is contained in:
parent
5f497ea8bd
commit
ee8b240cff
@ -1,8 +1,10 @@
|
|||||||
<div id="site-dropdown-container" class="adf-site-dropdown-container">
|
<div id="site-dropdown-container" class="adf-site-dropdown-container">
|
||||||
<mat-form-field class="adf-sites-dropdown-form-field" appearance="fill" subscriptSizing="dynamic">
|
<mat-form-field class="adf-sites-dropdown-form-field" appearance="fill" subscriptSizing="dynamic">
|
||||||
|
<mat-label>{{placeholder | translate}}</mat-label>
|
||||||
<mat-select
|
<mat-select
|
||||||
adf-infinite-select-scroll
|
adf-infinite-select-scroll
|
||||||
(scrollEnd)="loadAllOnScroll()"
|
(scrollEnd)="loadAllOnScroll()"
|
||||||
|
#siteSelect
|
||||||
data-automation-id="site-my-files-option"
|
data-automation-id="site-my-files-option"
|
||||||
class="adf-site-dropdown-list-element"
|
class="adf-site-dropdown-list-element"
|
||||||
id="site-dropdown"
|
id="site-dropdown"
|
||||||
|
@ -32,6 +32,7 @@ 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: {
|
||||||
@ -66,6 +67,10 @@ describe('DropdownSitesComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
fixture.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
describe('Rendering tests', () => {
|
describe('Rendering tests', () => {
|
||||||
describe('Infinite Loading', () => {
|
describe('Infinite Loading', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@ -144,10 +149,10 @@ describe('DropdownSitesComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const select = await loader.getHarness(MatSelectHarness);
|
const selectFormField = await loader.getHarness(MatFormFieldHarness);
|
||||||
await select.open();
|
const label = await selectFormField.getLabel();
|
||||||
|
|
||||||
expect(fixture.nativeElement.innerText.trim()).toContain('NODE_SELECTOR.LOCATION');
|
expect(label).toContain('DROPDOWN.PLACEHOLDER_LABEL');
|
||||||
});
|
});
|
||||||
|
|
||||||
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 () => {
|
||||||
@ -156,10 +161,10 @@ describe('DropdownSitesComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const select = await loader.getHarness(MatSelectHarness);
|
const selectFormField = await loader.getHarness(MatFormFieldHarness);
|
||||||
await select.open();
|
const label = await selectFormField.getLabel();
|
||||||
|
|
||||||
expect(fixture.nativeElement.innerText.trim()).toContain('NODE_SELECTOR.LOCATION');
|
expect(label).toContain('NODE_SELECTOR.SELECT_LIBRARY');
|
||||||
});
|
});
|
||||||
|
|
||||||
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 () => {
|
||||||
|
@ -1431,7 +1431,7 @@ describe('DocumentList', () => {
|
|||||||
expect(documentList.reload).toHaveBeenCalled();
|
expect(documentList.reload).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not show loading state if pagination is updated with merge setting as true', fakeAsync(() => {
|
it('should not show loading state if pagination is updated with merge setting as true', () => {
|
||||||
spyFolderNode = spyOn(documentListService, 'loadFolderByNodeId').and.callFake(() =>
|
spyFolderNode = spyOn(documentListService, 'loadFolderByNodeId').and.callFake(() =>
|
||||||
of(
|
of(
|
||||||
new DocumentLoaderNode(null, {
|
new DocumentLoaderNode(null, {
|
||||||
@ -1456,7 +1456,7 @@ describe('DocumentList', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('#adf-document-list-loading')).toBe(null);
|
expect(element.querySelector('#adf-document-list-loading')).toBe(null);
|
||||||
}));
|
});
|
||||||
|
|
||||||
it('should NOT reload data on first call of ngOnChanges', () => {
|
it('should NOT reload data on first call of ngOnChanges', () => {
|
||||||
spyOn(documentList, 'reload').and.stub();
|
spyOn(documentList, 'reload').and.stub();
|
||||||
|
@ -26,6 +26,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { NgForOf, NgIf } from '@angular/common';
|
import { NgForOf, NgIf } from '@angular/common';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';
|
import { DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';
|
||||||
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-context-menu',
|
selector: 'adf-context-menu',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user