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
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Monday, March 24th
Show more breadcrumbs
vtechworks
Dspace7 Angular
Commits
5e523a56
Commit
5e523a56
authored
8 years ago
by
Art Lowel
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'upstream/pr/37' into inital-tests
parents
8e4bec9c
bd29e4ad
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/app.component.spec.ts
+15
-7
15 additions, 7 deletions
src/app/app.component.spec.ts
with
15 additions
and
7 deletions
src/app/app.component.spec.ts
+
15
−
7
View file @
5e523a56
...
...
@@ -9,11 +9,11 @@ import {
CUSTOM_ELEMENTS_SCHEMA
,
DebugElement
}
from
"
@angular/core
"
;
import
{
By
}
from
'
@angular/platform-browser
'
;
import
{
TranslateModule
}
from
"
ng2-translate
"
;
import
{
NgbCollapseModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
;
import
{
Store
}
from
"
@ngrx/store
"
;
// Load the implementations that should be tested
import
{
AppComponent
}
from
'
./app.component
'
;
import
{
HeaderComponent
}
from
'
./header/header.component
'
;
...
...
@@ -25,10 +25,10 @@ let fixture: ComponentFixture<AppComponent>;
let
de
:
DebugElement
;
let
el
:
HTMLElement
;
describe
(
'
App component
'
,
()
=>
{
beforeEach
(()
=>
{
// async beforeEach
beforeEach
(
async
(()
=>
{
return
TestBed
.
configureTestingModule
({
imports
:
[
CommonModule
,
TranslateModule
.
forRoot
(),
NgbCollapseModule
.
forRoot
()],
declarations
:
[
AppComponent
,
HeaderComponent
],
// declare the test component
...
...
@@ -40,10 +40,18 @@ describe('App component', () => {
}
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
}).
compileComponents
().
then
(()
=>
{
fixture
=
TestBed
.
createComponent
(
AppComponent
);
fixture
.
detectChanges
();
});
})
}));
// synchronous beforeEach
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
AppComponent
);
comp
=
fixture
.
componentInstance
;
// BannerComponent test instance
// query for the title <p> by CSS element selector
de
=
fixture
.
debugElement
.
query
(
By
.
css
(
'
p
'
));
el
=
de
.
nativeElement
;
});
it
(
'
should create component
'
,
inject
([
AppComponent
],
(
app
:
AppComponent
)
=>
{
...
...
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