mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
101198: in place links replaced with buttons
This commit is contained in:
@@ -16,6 +16,7 @@ import { of as observableOf } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { isEmpty, isNotEmpty } from '../../shared/empty.util';
|
||||
import { FlatNode } from '../flat-node.model';
|
||||
import { RouterLinkWithHref } from '@angular/router';
|
||||
|
||||
describe('CommunityListComponent', () => {
|
||||
let component: CommunityListComponent;
|
||||
@@ -194,7 +195,7 @@ describe('CommunityListComponent', () => {
|
||||
}),
|
||||
CdkTreeModule,
|
||||
RouterTestingModule],
|
||||
declarations: [CommunityListComponent],
|
||||
declarations: [CommunityListComponent, RouterLinkWithHref],
|
||||
providers: [CommunityListComponent,
|
||||
{ provide: CommunityListService, useValue: communityListServiceStub },],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -230,9 +231,14 @@ describe('CommunityListComponent', () => {
|
||||
expect(showMoreEl).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should not render the show more button as an empty link', () => {
|
||||
const debugElements = fixture.debugElement.queryAll(By.directive(RouterLinkWithHref));
|
||||
expect(debugElements).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('when show more of top communities is clicked', () => {
|
||||
beforeEach(fakeAsync(() => {
|
||||
const showMoreLink = fixture.debugElement.query(By.css('.show-more-node a'));
|
||||
const showMoreLink = fixture.debugElement.query(By.css('.show-more-node .btn-outline-primary'));
|
||||
showMoreLink.triggerEventHandler('click', {
|
||||
preventDefault: () => {/**/
|
||||
}
|
||||
@@ -240,6 +246,7 @@ describe('CommunityListComponent', () => {
|
||||
tick();
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('tree contains maximum of currentPage (2) * (2) elementsPerPage of first top communities, or less if there are less communities (3)', () => {
|
||||
const expandableNodesFound = fixture.debugElement.queryAll(By.css('.expandable-node a'));
|
||||
const childlessNodesFound = fixture.debugElement.queryAll(By.css('.childless-node a'));
|
||||
|
Reference in New Issue
Block a user