test_to_dev #1513

Merged
alexm merged 12 commits from test_to_dev into dev 2023-05-10 10:41:12 +00:00
1 changed files with 2 additions and 13 deletions
Showing only changes of commit a2e71b57a2 - Show all commits

View File

@ -17,17 +17,6 @@ describe('Component vnTh', () => {
controller.column.setAttribute('field', 'MyField');
}));
describe('onInit()', () => {
it(`should define controllers order as per defaultOrder then call setOrder()`, () => {
controller.defaultOrder = 'DESC';
jest.spyOn(controller.table, 'setOrder');
controller.$onInit();
expect(controller.order).toEqual('DESC');
expect(controller.table.setOrder).toHaveBeenCalledWith('MyField', 'DESC');
});
});
describe('toggleOrder()', () => {
it(`should change the ordenation to DESC (descendant) if it was ASC (ascendant)`, () => {
controller.order = 'ASC';
@ -61,7 +50,7 @@ describe('Component vnTh', () => {
expect(controller.updateArrow).not.toHaveBeenCalledWith();
});
it(`should call toggleOrder() method if field property and
it(`should call toggleOrder() method if field property and
table field property equals and then call updateArrow()`, () => {
controller.table.field = 'MyField';
jest.spyOn(controller, 'toggleOrder');
@ -73,7 +62,7 @@ describe('Component vnTh', () => {
expect(controller.updateArrow).toHaveBeenCalledWith();
});
it(`should call setOrder() method if field property and
it(`should call setOrder() method if field property and
table field property doesn't equals and then call updateArrow()`, () => {
controller.table.field = 'MyField2';
jest.spyOn(controller.table, 'setOrder');