Skip to content

Commit

Permalink
SHIBUI-947 Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 8, 2018
1 parent e4498de commit 794c948
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('Dashboard Resolvers List Page', () => {
it('should route to the wizard page', () => {
spyOn(router, 'navigate');
instance.edit(draft);
expect(router.navigate).toHaveBeenCalledWith(['metadata', 'resolver', 'new'], {
expect(router.navigate).toHaveBeenCalledWith(['metadata', 'resolver', 'new', 'blank', 'org-info'], {
queryParams: { id: '1' }
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { METADATA_SOURCE_WIZARD } from '../wizard-definition';
import { MetadataSourceWizard } from '../../domain/model/wizards/metadata-source-wizard';
import { initialState } from '../reducer/entity.reducer';
import { MockWizardModule } from '../../../../testing/wizard.stub';
import { RouterStateSnapshot } from '@angular/router';
import { RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';
import { NgbModalStub } from '../../../../testing/modal.stub';
import { of } from 'rxjs';
import { MetadataResolver } from '../../domain/model';
Expand Down Expand Up @@ -115,9 +115,12 @@ describe('Resolver Wizard Component', () => {
}));

describe('canDeactivate method', () => {
it('should return true if moving to another edit page', async(() => {
it('should return true if moving to another page', async(() => {
app.canDeactivate(null, null, {
url: 'wizard'
url: 'blank',
root: <any>{
queryParams: { id: 'foo' }
}
} as RouterStateSnapshot).subscribe((can) => {
expect(can).toBe(true);
});
Expand Down

0 comments on commit 794c948

Please sign in to comment.