Merge pull request '2242-test' (#263) from 2242-test into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-by: Carlos Jimenez <carlosjr@verdnatura.es>
This commit is contained in:
commit
f4984c142f
|
@ -40,6 +40,26 @@ describe('Item', () => {
|
|||
expect(controller.item.id).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('scrollToLine ()', () => {
|
||||
it('should assign $location then call anchorScroll using controller value', () => {
|
||||
jest.spyOn(controller, '$anchorScroll');
|
||||
controller.lineFk = 1;
|
||||
controller.scrollToLine('invalidValue');
|
||||
|
||||
expect(controller.$location.hash()).toEqual(`vnItemDiary-${1}`);
|
||||
expect(controller.$anchorScroll).toHaveBeenCalledWith();
|
||||
});
|
||||
|
||||
it('should assign $location then call anchorScroll using received value', () => {
|
||||
jest.spyOn(controller, '$anchorScroll');
|
||||
controller.lineFk = undefined;
|
||||
controller.scrollToLine(1);
|
||||
|
||||
expect(controller.$location.hash()).toEqual(`vnItemDiary-${1}`);
|
||||
expect(controller.$anchorScroll).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue