test
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javi Gallego 2020-05-19 12:21:02 +02:00
parent a7e6e3d4b7
commit ff03133277
2 changed files with 21 additions and 1 deletions

View File

@ -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.ticketFk = 1;
controller.scrollToLine('invalidValue');
expect(controller.$location).toEqual(`vnItemDiary-${1}`);
expect(controller.$anchorScroll).toHaveBeenCalledWith();
});
it('should assign $location then call anchorScroll using received value', () => {
jest.spyOn(controller, '$anchorScroll');
controller.ticketFk = undefined;
controller.scrollToLine(1);
expect(controller.$location).toEqual(`vnItemDiary-${1}`);
expect(controller.$anchorScroll).toHaveBeenCalledWith();
});
});
});
});

View File

@ -12,7 +12,7 @@ describe('component vnUpcomingDeliveries', () => {
controller = $componentController('vnUpcomingDeliveries', {$element, $scope});
}));
fdescribe('getWeekDay()', () => {
describe('getWeekDay()', () => {
it('should retrieve a weekday for a json passed', () => {
let jsonDate = '1970-01-01T22:00:00.000Z';