mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
Disabled add section button when no options are available
This commit is contained in:
@@ -130,13 +130,18 @@ describe('SubmissionFormSectionAddComponent Component', () => {
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
comp.sectionList.subscribe((list) => {
|
||||
comp.sectionList$.subscribe((list) => {
|
||||
expect(list).toEqual(mockAvailableSections);
|
||||
})
|
||||
});
|
||||
|
||||
comp.hasSections$.subscribe((hasSections) => {
|
||||
expect(hasSections).toEqual(true);
|
||||
})
|
||||
});
|
||||
|
||||
it('should call addSection', () => {
|
||||
submissionServiceStub.getDisabledSectionsList.and.returnValue(observableOf(mockAvailableSections));
|
||||
|
||||
comp.addSection(mockAvailableSections[1].id);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
Reference in New Issue
Block a user