Commits

jonas-atmire authored aa757cfe231
Redirecting to item edit page on the bitstream tab, instead of the item viewing page
No tags

src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts

Modified
232 232 });
233 233 });
234 234 describe('when the cancel button is clicked', () => {
235 235 it('should call navigateToItemEditBitstreams method', () => {
236 236 spyOn(comp, 'navigateToItemEditBitstreams');
237 237 comp.onCancel();
238 238 expect(comp.navigateToItemEditBitstreams).toHaveBeenCalled();
239 239 });
240 240 });
241 241 describe('when navigateToItemEditBitstreams is called, and the component has an itemId', () => {
242 - it('should redirect to the item edit path bitstream page', () => {
243 - comp.itemId = 'some-uuid'
242 + it('should redirect to the item edit page on the bitstreams tab with the itemId from the component', () => {
243 + comp.itemId = 'some-uuid1'
244 244 comp.navigateToItemEditBitstreams();
245 - expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditRoute('some-uuid'), 'bitstreams']);
245 + expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditRoute('some-uuid1'), 'bitstreams']);
246 246 });
247 247 });
248 248 describe('when navigateToItemEditBitstreams is called, and the component does not have an itemId', () => {
249 - it('should redirect to the item page', () => {
249 + it('should redirect to the item edit page on the bitstreams tab with the itemId from the bundle links ', () => {
250 250 comp.itemId = undefined;
251 251 comp.navigateToItemEditBitstreams();
252 - expect(routerStub.navigate).toHaveBeenCalledWith([getItemPageRoute('some-uuid')]);
252 + expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditRoute('some-uuid'), 'bitstreams']);
253 253 });
254 254 });
255 255 });

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut