This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
09a7b75d
Commit
09a7b75d
authored
4 years ago
by
Michael Breu
Browse files
Options
Downloads
Patches
Plain Diff
Fixing Tests
parent
9e3c5ecb
2 merge requests
!17
Initial Merge to Prepare Release 1.0.0
,
!1
Resolve "Metadaten konsolideren"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/javascript/spec/app/layouts/navbar/navbar.component.spec.ts
+18
-1
18 additions, 1 deletion
...vascript/spec/app/layouts/navbar/navbar.component.spec.ts
with
18 additions
and
1 deletion
src/test/javascript/spec/app/layouts/navbar/navbar.component.spec.ts
+
18
−
1
View file @
09a7b75d
...
@@ -6,6 +6,8 @@ import { ProfileInfo } from 'app/layouts/profiles/profile-info.model';
...
@@ -6,6 +6,8 @@ import { ProfileInfo } from 'app/layouts/profiles/profile-info.model';
import
{
NavbarComponent
}
from
'
app/layouts/navbar/navbar.component
'
;
import
{
NavbarComponent
}
from
'
app/layouts/navbar/navbar.component
'
;
import
{
AccountService
}
from
'
app/core/auth/account.service
'
;
import
{
AccountService
}
from
'
app/core/auth/account.service
'
;
import
{
ProfileService
}
from
'
app/layouts/profiles/profile.service
'
;
import
{
ProfileService
}
from
'
app/layouts/profiles/profile.service
'
;
import
{
SearchService
}
from
'
app/search/service/search-service
'
import
{
FormBuilder
}
from
'
@angular/forms
'
;
describe
(
'
Component Tests
'
,
()
=>
{
describe
(
'
Component Tests
'
,
()
=>
{
describe
(
'
Navbar Component
'
,
()
=>
{
describe
(
'
Navbar Component
'
,
()
=>
{
...
@@ -13,11 +15,14 @@ describe('Component Tests', () => {
...
@@ -13,11 +15,14 @@ describe('Component Tests', () => {
let
fixture
:
ComponentFixture
<
NavbarComponent
>
;
let
fixture
:
ComponentFixture
<
NavbarComponent
>
;
let
accountService
:
AccountService
;
let
accountService
:
AccountService
;
let
profileService
:
ProfileService
;
let
profileService
:
ProfileService
;
let
searchService
:
SearchService
;
beforeEach
(
async
(()
=>
{
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
TestBed
.
configureTestingModule
({
imports
:
[
GitsearchTestModule
],
imports
:
[
GitsearchTestModule
],
declarations
:
[
NavbarComponent
],
declarations
:
[
NavbarComponent
],
providers
:
[
FormBuilder
],
})
})
.
overrideTemplate
(
NavbarComponent
,
''
)
.
overrideTemplate
(
NavbarComponent
,
''
)
.
compileComponents
();
.
compileComponents
();
...
@@ -28,6 +33,7 @@ describe('Component Tests', () => {
...
@@ -28,6 +33,7 @@ describe('Component Tests', () => {
comp
=
fixture
.
componentInstance
;
comp
=
fixture
.
componentInstance
;
accountService
=
TestBed
.
get
(
AccountService
);
accountService
=
TestBed
.
get
(
AccountService
);
profileService
=
TestBed
.
get
(
ProfileService
);
profileService
=
TestBed
.
get
(
ProfileService
);
searchService
=
TestBed
.
get
(
SearchService
);
});
});
it
(
'
Should call profileService.getProfileInfo on init
'
,
()
=>
{
it
(
'
Should call profileService.getProfileInfo on init
'
,
()
=>
{
...
@@ -48,5 +54,16 @@ describe('Component Tests', () => {
...
@@ -48,5 +54,16 @@ describe('Component Tests', () => {
// THEN
// THEN
expect
(
accountService
.
isAuthenticated
).
toHaveBeenCalled
();
expect
(
accountService
.
isAuthenticated
).
toHaveBeenCalled
();
});
});
/* TODO later
it('Should call searchService.searchPageDetails on search changed', () => {
// WHEN
comp.searchChanged();
// THEN
expect(searchService.searchPageDetails).toHaveBeenCalled();
});
*/
});
});
});
});
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