2019-08-19 12:20:38 +01:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import VerticalArrows from '@/components/common/VerticalArrows.vue';
|
2019-09-09 11:33:39 +01:00
|
|
|
|
2019-08-19 12:20:38 +01:00
|
|
|
import { SortingDirectionEnum } from '@/types/sortingArrows';
|
2019-09-09 11:33:39 +01:00
|
|
|
import { mount } from '@vue/test-utils';
|
2019-08-19 12:20:38 +01:00
|
|
|
|
|
|
|
describe('VerticalArrows.vue', () => {
|
|
|
|
it('should render with bottom arrow highlighted', function () {
|
|
|
|
const wrapper = mount(VerticalArrows, {
|
|
|
|
propsData: {
|
|
|
|
isActive: true,
|
2019-09-13 15:58:18 +01:00
|
|
|
direction: SortingDirectionEnum.BOTTOM,
|
|
|
|
},
|
2019-08-19 12:20:38 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render without any highlighted arrows', function () {
|
|
|
|
const wrapper = mount(VerticalArrows, {
|
|
|
|
propsData: {
|
|
|
|
isActive: false,
|
2019-09-13 15:58:18 +01:00
|
|
|
direction: SortingDirectionEnum.BOTTOM,
|
|
|
|
},
|
2019-08-19 12:20:38 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render with top arrow highlighted', function () {
|
|
|
|
const wrapper = mount(VerticalArrows, {
|
|
|
|
propsData: {
|
|
|
|
isActive: true,
|
2019-09-13 15:58:18 +01:00
|
|
|
direction: SortingDirectionEnum.TOP,
|
|
|
|
},
|
2019-08-19 12:20:38 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|