mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Update tests to match
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
@@ -17,7 +17,8 @@ import { AccessControlMenuProvider } from './access-control.menu';
|
|||||||
import { ScriptDataService } from '../../../core/data/processes/script-data.service';
|
import { ScriptDataService } from '../../../core/data/processes/script-data.service';
|
||||||
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.access_control',
|
text: 'menu.section.access_control',
|
||||||
@@ -25,7 +26,7 @@ const expectedTopSection: MenuTopSection = {
|
|||||||
icon: 'key'
|
icon: 'key'
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { AdminSearchMenuProvider } from './admin-search.menu';
|
import { AdminSearchMenuProvider } from './admin-search.menu';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { BrowseMenuProvider } from './browse.menu';
|
import { BrowseMenuProvider } from './browse.menu';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { BrowseService } from '../../../core/browse/browse.service';
|
import { BrowseService } from '../../../core/browse/browse.service';
|
||||||
import { BrowseServiceStub } from '../../testing/browse-service.stub';
|
import { BrowseServiceStub } from '../../testing/browse-service.stub';
|
||||||
import { ObjectCacheService } from '../../../core/cache/object-cache.service';
|
import { ObjectCacheService } from '../../../core/cache/object-cache.service';
|
||||||
@@ -18,7 +18,8 @@ import { BrowseDefinition } from '../../../core/shared/browse-definition.model';
|
|||||||
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
|
||||||
import { createPaginatedList } from '../../testing/utils.test';
|
import { createPaginatedList } from '../../testing/utils.test';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.browse_global',
|
text: 'menu.section.browse_global',
|
||||||
@@ -26,7 +27,7 @@ const expectedTopSection: MenuTopSection = {
|
|||||||
icon: 'globe',
|
icon: 'globe',
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { CommunityListMenuProvider } from './community-list.menu';
|
import { CommunityListMenuProvider } from './community-list.menu';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
|
|
||||||
const expectedSections: PartialMenuSection[] = [
|
const expectedSections: PartialMenuSection[] = [
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
@@ -8,14 +8,15 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
|
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
|
||||||
import { EditMenuProvider } from './edit.menu';
|
import { EditMenuProvider } from './edit.menu';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.edit'
|
text: 'menu.section.edit'
|
||||||
@@ -23,7 +24,7 @@ const expectedTopSection: MenuTopSection = {
|
|||||||
icon: 'pencil',
|
icon: 'pencil',
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
@@ -16,16 +16,16 @@ import { ScriptDataService } from '../../../core/data/processes/script-data.serv
|
|||||||
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
||||||
import { ExportMenuProvider } from './export.menu';
|
import { ExportMenuProvider } from './export.menu';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.export',
|
text: 'menu.section.export',
|
||||||
},
|
},
|
||||||
icon: 'file-export',
|
icon: 'file-export',
|
||||||
shouldPersistOnRouteChange: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
@@ -33,7 +33,6 @@ const expectedSubSections: MenuSubSection[] = [
|
|||||||
text: 'menu.section.export_metadata',
|
text: 'menu.section.export_metadata',
|
||||||
function: jasmine.any(Function) as any,
|
function: jasmine.any(Function) as any,
|
||||||
},
|
},
|
||||||
shouldPersistOnRouteChange: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
@@ -42,7 +41,6 @@ const expectedSubSections: MenuSubSection[] = [
|
|||||||
text: 'menu.section.export_batch',
|
text: 'menu.section.export_batch',
|
||||||
function: jasmine.any(Function) as any,
|
function: jasmine.any(Function) as any,
|
||||||
},
|
},
|
||||||
shouldPersistOnRouteChange: true,
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
@@ -16,16 +16,16 @@ import { ImportMenuProvider } from './import.menu';
|
|||||||
import { ScriptDataService } from '../../../core/data/processes/script-data.service';
|
import { ScriptDataService } from '../../../core/data/processes/script-data.service';
|
||||||
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.import',
|
text: 'menu.section.import',
|
||||||
},
|
},
|
||||||
icon: 'file-import',
|
icon: 'file-import',
|
||||||
shouldPersistOnRouteChange: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
|
@@ -8,14 +8,15 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { NewMenuProvider } from './new.menu';
|
import { NewMenuProvider } from './new.menu';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
|
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.new'
|
text: 'menu.section.new'
|
||||||
@@ -23,7 +24,7 @@ const expectedTopSection: MenuTopSection = {
|
|||||||
icon: 'plus',
|
icon: 'plus',
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { MenuSubSection, MenuTopSection } from './expandable-menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
|
||||||
@@ -16,7 +16,8 @@ import { ScriptDataService } from '../../../core/data/processes/script-data.serv
|
|||||||
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
import { ScriptServiceStub } from '../../testing/script-service.stub';
|
||||||
import { RegistriesMenuProvider } from './registries.menu';
|
import { RegistriesMenuProvider } from './registries.menu';
|
||||||
|
|
||||||
const expectedTopSection: MenuTopSection = {
|
const expectedTopSection: PartialMenuSection = {
|
||||||
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.registries',
|
text: 'menu.section.registries',
|
||||||
@@ -24,7 +25,7 @@ const expectedTopSection: MenuTopSection = {
|
|||||||
icon: 'list',
|
icon: 'list',
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectedSubSections: MenuSubSection[] = [
|
const expectedSubSections: PartialMenuSection[] = [
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
model: {
|
model: {
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PartialMenuSection } from '../menu-provider';
|
import { PartialMenuSection } from '../menu-provider.model';
|
||||||
import { MenuItemType } from '../menu-item-type.model';
|
import { MenuItemType } from '../menu-item-type.model';
|
||||||
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../testing/authorization-service.stub';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
|
Reference in New Issue
Block a user