101623: Fix lint/tests after removing invalid links, Make arrows on Treeview smaller

This commit is contained in:
Nona Luypaert
2023-05-30 14:05:44 +02:00
parent 85f95112b3
commit 138fccf711
5 changed files with 14 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ describe('BrowseService', () => {
const browseDefinitions = [
Object.assign(new FlatBrowseDefinition(), {
id: 'date',
metadataBrowse: false,
browseType: 'flatBrowse',
sortOptions: [
{
name: 'title',
@@ -54,7 +54,7 @@ describe('BrowseService', () => {
}),
Object.assign(new ValueListBrowseDefinition(), {
id: 'author',
metadataBrowse: true,
browseType: 'valueList',
sortOptions: [
{
name: 'title',
@@ -158,7 +158,7 @@ describe('BrowseService', () => {
describe('when getBrowseEntriesFor is called with a valid browse definition id', () => {
it('should call hrefOnlyDataService.findListByHref with the expected href', () => {
const expected = browseDefinitions[1]._links.entries.href;
const expected = (browseDefinitions[1] as ValueListBrowseDefinition)._links.entries.href;
scheduler.schedule(() => service.getBrowseEntriesFor(new BrowseEntrySearchOptions(browseDefinitions[1].id)).subscribe());
scheduler.flush();

View File

@@ -24,13 +24,13 @@ export class FlatBrowseDefinition extends NonHierarchicalBrowseDefinition {
return this._links.self.href;
}
getRenderType(): string {
return this.dataType;
}
@deserialize
_links: {
self: HALLink;
items: HALLink;
};
getRenderType(): string {
return this.dataType;
}
}

View File

@@ -1,7 +1,6 @@
import { autoserialize, autoserializeAs, deserialize, inheritSerialization } from 'cerialize';
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
import { SortOption } from './sort-option.model';
import { BrowseByDataType } from '../../browse-by/browse-by-switcher/browse-by-decorator';
import { HALLink } from './hal-link.model';
import { BrowseDefinition } from './browse-definition.model';
/**

View File

@@ -24,13 +24,13 @@ export class ValueListBrowseDefinition extends NonHierarchicalBrowseDefinition {
return this._links.self.href;
}
getRenderType(): string {
return this.dataType;
}
@deserialize
_links: {
self: HALLink;
entries: HALLink;
};
getRenderType(): string {
return this.dataType;
}
}

View File

@@ -23,7 +23,7 @@
<!-- Leaf node -->
<cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="d-flex">
<button type="button" class="btn btn-default" cdkTreeNodeToggle>
<span class="fas fa-angle-right fa-2x invisible" aria-hidden="true"></span>
<span class="fas fa-angle-right invisible" aria-hidden="true"></span>
</button>
<label *ngIf="multiSelect" class="d-flex align-items-center m-0 p-0 form-check"
[class.text-success]="node.isSelected"
@@ -54,7 +54,7 @@
<button type="button" class="btn btn-default" cdkTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name"
(click)="loadChildren(node)">
<span class="fas {{treeControl.isExpanded(node) ? 'fa-angle-down' : 'fa-angle-right'}} fa-2x"
<span class="fas {{treeControl.isExpanded(node) ? 'fa-angle-down' : 'fa-angle-right'}}"
aria-hidden="true"></span>
</button>