Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dspace7 Angular
Manage
Activity
Members
Labels
Plan
Issues
42
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vtechworks
Dspace7 Angular
Commits
709726e0
Commit
709726e0
authored
4 years ago
by
Danilo Di Nuzzo
Browse files
Options
Downloads
Patches
Plain Diff
[CST-3105] tests
parent
136e36af
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/submission/form/collection/submission-form-collection.component.spec.ts
+21
-1
21 additions, 1 deletion
...m/collection/submission-form-collection.component.spec.ts
with
21 additions
and
1 deletion
src/app/submission/form/collection/submission-form-collection.component.spec.ts
+
21
−
1
View file @
709726e0
...
...
@@ -18,8 +18,12 @@ import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/jso
import
{
JsonPatchOperationPathCombiner
}
from
'
../../../core/json-patch/builder/json-patch-operation-path-combiner
'
;
import
{
createTestComponent
}
from
'
../../../shared/testing/utils.test
'
;
import
{
CollectionDataService
}
from
'
../../../core/data/collection-data.service
'
;
import
{
hot
}
from
'
jasmine-marbles
'
;
import
{
of
}
from
'
rxjs
'
;
import
{
SectionsService
}
from
'
../../sections/sections.service
'
;
import
{
componentFactoryName
}
from
'
@angular/compiler
'
;
describe
(
'
SubmissionFormCollectionComponent Component
'
,
()
=>
{
f
describe
(
'
SubmissionFormCollectionComponent Component
'
,
()
=>
{
let
comp
:
SubmissionFormCollectionComponent
;
let
compAsAny
:
any
;
...
...
@@ -48,6 +52,10 @@ describe('SubmissionFormCollectionComponent Component', () => {
replace
:
jasmine
.
createSpy
(
'
replace
'
)
});
const
sectionsService
:
any
=
jasmine
.
createSpyObj
(
'
sectionsService
'
,
{
isSectionAvailable
:
of
(
true
)
});
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
imports
:
[
...
...
@@ -67,6 +75,7 @@ describe('SubmissionFormCollectionComponent Component', () => {
{
provide
:
CommunityDataService
,
useValue
:
communityDataService
},
{
provide
:
JsonPatchOperationsBuilder
,
useValue
:
jsonPatchOpBuilder
},
{
provide
:
Store
,
useValue
:
store
},
{
provide
:
SectionsService
,
useValue
:
sectionsService
},
ChangeDetectorRef
,
SubmissionFormCollectionComponent
],
...
...
@@ -160,6 +169,17 @@ describe('SubmissionFormCollectionComponent Component', () => {
});
}));
it
(
'
the dropdown menu should be enable
'
,
()
=>
{
const
dropDown
=
fixture
.
debugElement
.
query
(
By
.
css
(
'
#collectionControlsDropdownMenu
'
));
expect
(
dropDown
).
toBeTruthy
();
});
it
(
'
the dropdown menu should be disabled
'
,
()
=>
{
comp
.
available$
=
of
(
false
);
fixture
.
detectChanges
();
const
dropDown
=
fixture
.
debugElement
.
query
(
By
.
css
(
'
#collectionControlsDropdownMenu
'
));
expect
(
dropDown
).
toBeFalsy
();
});
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment