Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
enasequence
webin-portal
Commits
d0b7118c
Commit
d0b7118c
authored
Sep 24, 2020
by
rajkumar
Browse files
Updated the unit test classes and sample submission success message
parent
6dba2cd3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
frontend/src/app/checklist/checklist.component.spec.ts
frontend/src/app/checklist/checklist.component.spec.ts
+6
-0
frontend/src/app/checklist/checklist.component.ts
frontend/src/app/checklist/checklist.component.ts
+1
-1
frontend/src/app/directives/app-disable-autofill.directive.spec.ts
...src/app/directives/app-disable-autofill.directive.spec.ts
+2
-3
frontend/src/app/study-management/study-management.component.spec.ts
...c/app/study-management/study-management.component.spec.ts
+2
-2
No files found.
frontend/src/app/checklist/checklist.component.spec.ts
View file @
d0b7118c
...
...
@@ -15,10 +15,12 @@ import { UiModule } from '../ui/ui.module';
import
{
WebinAuthenticationService
}
from
'
../webin-authentication.service
'
;
import
{
MockWebinAuthenticationService
}
from
'
../mock/mock-webin-authentication.service
'
;
import
{
WebinReportService
}
from
'
../webin-report.service
'
;
import
{
WebinRestService
}
from
'
../webin-rest.service
'
;
import
{
MockWebinReportService
}
from
'
../mock/mock-webin-report.service
'
;
import
{
ChecklistComponent
}
from
'
./checklist.component
'
;
import
{
RouterModule
}
from
'
@angular/router
'
;
import
{
MockWebinRestService
}
from
'
../mock/mock-webin-rest.service
'
;
describe
(
'
ChecklistComponent
'
,
()
=>
{
let
component
:
ChecklistComponent
;
...
...
@@ -37,6 +39,10 @@ describe('ChecklistComponent', () => {
provide
:
WebinReportService
,
useClass
:
MockWebinReportService
},
{
provide
:
WebinRestService
,
useClass
:
MockWebinRestService
},
]
})
.
compileComponents
();
...
...
frontend/src/app/checklist/checklist.component.ts
View file @
d0b7118c
...
...
@@ -418,7 +418,7 @@ export class ChecklistComponent implements OnInit {
}
else
{
console
.
log
(
result
.
accessions
);
let
message
=
"
Successfully
subimit
ed pr
oject with project identification :
"
+
result
.
accessions
[
0
][
"
accession
"
]
;
let
message
=
"
Successfully
upload
ed
s
pr
eadsheet template and the sample(s) are created.
"
;
this
.
showSuccessPopup
(
message
);
}
...
...
frontend/src/app/directives/app-disable-autofill.directive.spec.ts
View file @
d0b7118c
import
{
App
Di
s
ableAutofillDirective
}
from
'
./app-disable-autofill.directive
'
;
import
{
DiableAutofillDirective
}
from
'
./app-disable-autofill.directive
'
;
describe
(
'
AppDisableAutofillDirective
'
,
()
=>
{
it
(
'
should create an instance
'
,
()
=>
{
const
directive
=
new
AppDisableAutofillDirective
();
expect
(
directive
).
toBeTruthy
();
});
});
frontend/src/app/study-management/study-management.component.spec.ts
View file @
d0b7118c
import
{
async
,
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
StudyManagementComponent
}
from
'
./study-management.component
'
;
import
{
MatInputModule
,
MatFormFieldModule
,
MatIconModule
,
MatDividerModule
,
MatCardSubtitle
,
MatFormField
,
MatLabel
,
MatDatepickerModule
,
MatCardModule
,
MatAutocompleteModule
,
MatTableModule
,
MatError
,
MatProgressSpinnerModule
}
from
'
@angular/material
'
import
{
MatInputModule
,
MatFormFieldModule
,
MatIconModule
,
MatDividerModule
,
MatCardSubtitle
,
MatFormField
,
MatLabel
,
MatDatepickerModule
,
MatCardModule
,
MatAutocompleteModule
,
MatTableModule
,
MatError
,
MatProgressSpinnerModule
,
MatCheckboxModule
}
from
'
@angular/material
'
import
{
FormControl
,
FormGroupDirective
,
NgForm
,
Validators
,
FormGroup
,
FormBuilder
,
FormsModule
}
from
'
@angular/forms
'
;
import
{
CanActivate
,
Router
,
ActivatedRouteSnapshot
,
RouterStateSnapshot
,
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
BrowserAnimationsModule
}
from
'
@angular/platform-browser/animations
'
;
...
...
@@ -22,7 +22,7 @@ describe('StudyManagementComponent', () => {
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
imports
:
[
BrowserAnimationsModule
,
MatInputModule
,
MatFormFieldModule
,
HttpClientModule
,
ObserversModule
,
FormsModule
,
MatIconModule
,
MatDividerModule
,
MatDatepickerModule
,
MatCardModule
,
MatAutocompleteModule
,
MatTableModule
,
MatProgressSpinnerModule
],
imports
:
[
MatCheckboxModule
,
BrowserAnimationsModule
,
MatInputModule
,
MatFormFieldModule
,
HttpClientModule
,
ObserversModule
,
FormsModule
,
MatIconModule
,
MatDividerModule
,
MatDatepickerModule
,
MatCardModule
,
MatAutocompleteModule
,
MatTableModule
,
MatProgressSpinnerModule
],
declarations
:
[
StudyManagementComponent
],
providers
:[
WebinAuthenticationService
,
WebinRestService
,
{
provide
:
ActivatedRoute
,
useValue
:
fakeActivatedRoute
},]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment