Commit d0b7118c authored by rajkumar's avatar rajkumar
Browse files

Updated the unit test classes and sample submission success message

parent 6dba2cd3
......@@ -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();
......
......@@ -418,7 +418,7 @@ export class ChecklistComponent implements OnInit {
} else {
console.log(result.accessions);
let message="Successfully subimited project with project identification : "+result.accessions[0]["accession"];
let message="Successfully uploaded spreadsheet template and the sample(s) are created.";
this.showSuccessPopup(message);
}
......
import { AppDisableAutofillDirective } 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();
});
});
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},]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment