-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/Sage-Bionetworks/Agora i…
…nto develop
- Loading branch information
Showing
22 changed files
with
247 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { | ||
async, | ||
ComponentFixture, | ||
TestBed, | ||
fakeAsync | ||
} from '@angular/core/testing'; | ||
import { NO_ERRORS_SCHEMA } from '@angular/core'; | ||
import { Router, ActivatedRoute } from '@angular/router'; | ||
import { By } from '@angular/platform-browser'; | ||
|
||
import { | ||
DialogsServiceStub, | ||
RouterStub, | ||
ActivatedRouteStub, | ||
NavigationServiceStub | ||
} from '../../testing'; | ||
|
||
import { RNAComponent } from './rna-dialog.component'; | ||
|
||
import { DialogsService } from '../services'; | ||
import { NavigationService } from '../../core/services'; | ||
|
||
import { Dialog } from 'primeng/dialog'; | ||
|
||
import { MockComponent } from 'ng-mocks'; | ||
|
||
describe('Component: RNADialog', () => { | ||
let component: RNAComponent; | ||
let fixture: ComponentFixture<RNAComponent>; | ||
let router: RouterStub; | ||
let dialogsService: DialogsServiceStub; | ||
let activatedRoute: any; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ | ||
RNAComponent, | ||
MockComponent(Dialog), | ||
MockComponent(RNAComponent) | ||
], | ||
// The NO_ERRORS_SCHEMA tells the Angular compiler to ignore unrecognized | ||
// elements and attributes | ||
schemas: [NO_ERRORS_SCHEMA], | ||
providers: [ | ||
{ provide: Router, useValue: new RouterStub() }, | ||
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() }, | ||
{ provide: DialogsService, useValue: new DialogsServiceStub() }, | ||
{ provide: NavigationService, useValue: new NavigationServiceStub() }, | ||
] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(RNAComponent); | ||
|
||
// Get the injected instances | ||
router = fixture.debugElement.injector.get(Router); | ||
dialogsService = fixture.debugElement.injector.get(DialogsService); | ||
activatedRoute = fixture.debugElement.injector.get(ActivatedRoute); | ||
|
||
component = fixture.componentInstance; // Component test instance | ||
})); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
|
||
it('should have a dialog element', () => { | ||
const el = fixture.debugElement.query(By.css('p-dialog')); | ||
expect(el).toBeDefined(); | ||
|
||
const aEl = fixture.debugElement.queryAll(By.css('p-dialog')); | ||
expect(aEl.length).toEqual(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { | ||
TestBed | ||
} from '@angular/core/testing'; | ||
|
||
import { | ||
DialogsServiceStub | ||
} from '../../testing'; | ||
|
||
import { DialogsService } from './'; | ||
|
||
describe('Service: Dialogs: TestBed', () => { | ||
let geneService: DialogsServiceStub; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
providers: [ | ||
{ provide: DialogsService, useValue: new DialogsServiceStub() } | ||
] | ||
}); | ||
|
||
geneService = TestBed.get(DialogsService); | ||
}); | ||
|
||
it('should create an instance', () => { | ||
expect(geneService).toBeDefined(); | ||
}); | ||
}); |
Oops, something went wrong.