@gitlab/ui 40.1.0 → 40.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/components/base/alert/alert.js +1 -0
- package/dist/components/base/avatar/avatar.js +1 -0
- package/dist/components/base/badge/badge.js +1 -0
- package/dist/components/base/breadcrumb/breadcrumb.js +1 -0
- package/dist/components/base/button/button.js +1 -0
- package/dist/components/base/card/card.js +1 -0
- package/dist/components/base/carousel/carousel.js +1 -0
- package/dist/components/base/collapse/collapse.js +1 -0
- package/dist/components/base/drawer/drawer.js +1 -0
- package/dist/components/base/dropdown/dropdown.js +2 -0
- package/dist/components/base/form/form.js +1 -0
- package/dist/components/base/icon/icon.js +2 -0
- package/dist/components/base/label/label.js +1 -0
- package/dist/components/base/link/link.js +1 -0
- package/dist/components/base/markdown/markdown.js +1 -0
- package/dist/components/base/modal/modal.js +2 -0
- package/dist/components/base/pagination/pagination.js +2 -0
- package/dist/components/base/popover/popover.js +1 -0
- package/dist/components/base/table/table.js +2 -0
- package/dist/components/base/tabs/tabs/tabs.js +2 -0
- package/dist/components/base/token/token.js +1 -0
- package/dist/components/base/tooltip/tooltip.js +1 -0
- package/dist/components/charts/area/area.js +1 -15
- package/dist/components/charts/bar/bar.js +1 -0
- package/dist/components/charts/chart/chart.js +1 -0
- package/dist/components/charts/column/column.js +1 -0
- package/dist/components/charts/heatmap/heatmap.js +1 -0
- package/dist/components/charts/legend/legend.js +1 -0
- package/dist/components/charts/line/line.js +1 -17
- package/dist/components/charts/sparkline/sparkline.js +2 -0
- package/dist/components/charts/tooltip/tooltip.js +1 -0
- package/dist/components/utilities/intersperse/intersperse.js +2 -0
- package/dist/components/utilities/truncate/truncate.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/test_utils.js +3 -1
- package/package.json +4 -4
- package/src/components/base/alert/alert.vue +1 -0
- package/src/components/base/avatar/avatar.vue +1 -0
- package/src/components/base/badge/badge.vue +1 -0
- package/src/components/base/breadcrumb/breadcrumb.spec.js +1 -1
- package/src/components/base/breadcrumb/breadcrumb.vue +1 -0
- package/src/components/base/button/button.vue +1 -0
- package/src/components/base/card/card.vue +1 -0
- package/src/components/base/carousel/carousel.vue +1 -0
- package/src/components/base/collapse/collapse.vue +1 -0
- package/src/components/base/datepicker/datepicker.vue +1 -0
- package/src/components/base/drawer/drawer.vue +1 -0
- package/src/components/base/dropdown/dropdown.vue +1 -0
- package/src/components/base/form/form.vue +1 -0
- package/src/components/base/form/form_group/form_group.scss +4 -1
- package/src/components/base/form/form_group/form_group.stories.js +1 -1
- package/src/components/base/icon/icon.spec.js +1 -1
- package/src/components/base/icon/icon.vue +1 -0
- package/src/components/base/keyset_pagination/keyset_pagination.spec.js +1 -1
- package/src/components/base/label/label.vue +1 -0
- package/src/components/base/link/link.vue +1 -0
- package/src/components/base/markdown/markdown.vue +1 -0
- package/src/components/base/modal/modal.spec.js +1 -1
- package/src/components/base/modal/modal.vue +1 -0
- package/src/components/base/new_dropdowns/listbox/listbox.vue +1 -0
- package/src/components/base/paginated_list/paginated_list.vue +1 -1
- package/src/components/base/pagination/pagination.spec.js +1 -1
- package/src/components/base/pagination/pagination.vue +1 -0
- package/src/components/base/path/path.vue +1 -0
- package/src/components/base/popover/popover.vue +1 -0
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.vue +2 -2
- package/src/components/base/search_box_by_type/search_box_by_type.spec.js +1 -1
- package/src/components/base/table/table.vue +1 -0
- package/src/components/base/tabs/tab/tab.vue +1 -0
- package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +1 -1
- package/src/components/base/tabs/tabs/tabs.vue +1 -0
- package/src/components/base/toggle/toggle.vue +1 -0
- package/src/components/base/token/token.vue +1 -0
- package/src/components/base/token_selector/token_container.spec.js +1 -1
- package/src/components/base/tooltip/tooltip.vue +1 -0
- package/src/components/charts/area/area.spec.js +2 -3
- package/src/components/charts/area/area.vue +1 -0
- package/src/components/charts/bar/bar.spec.js +2 -2
- package/src/components/charts/bar/bar.vue +1 -0
- package/src/components/charts/chart/chart.spec.js +1 -1
- package/src/components/charts/chart/chart.vue +1 -0
- package/src/components/charts/column/column.vue +1 -0
- package/src/components/charts/column/column_chart.spec.js +2 -2
- package/src/components/charts/gauge/gauge.spec.js +1 -1
- package/src/components/charts/gauge/gauge.vue +1 -0
- package/src/components/charts/heatmap/heatmap.spec.js +2 -2
- package/src/components/charts/heatmap/heatmap.vue +1 -0
- package/src/components/charts/legend/legend.spec.js +1 -1
- package/src/components/charts/legend/legend.vue +1 -0
- package/src/components/charts/line/line.spec.js +2 -4
- package/src/components/charts/line/line.vue +1 -0
- package/src/components/charts/sparkline/sparkline.spec.js +2 -2
- package/src/components/charts/sparkline/sparkline.vue +1 -0
- package/src/components/charts/stacked_column/stacked_column.spec.js +3 -4
- package/src/components/charts/tooltip/tooltip.spec.js +1 -1
- package/src/components/charts/tooltip/tooltip.vue +1 -0
- package/src/components/regions/empty_state/empty_state.spec.js +1 -1
- package/src/components/utilities/animated_number/animated_number.spec.js +1 -1
- package/src/components/utilities/intersection_observer/intersection_observer.spec.js +1 -1
- package/src/components/utilities/intersperse/intersperse.vue +1 -0
- package/src/components/utilities/sprintf/sprintf.vue +1 -0
- package/src/components/utilities/truncate/truncate.spec.js +1 -1
- package/src/components/utilities/truncate/truncate.vue +1 -0
- package/src/directives/hover_load/hover_load.spec.js +3 -1
- package/src/directives/outside/outside.spec.js +4 -1
- package/src/directives/resize_observer/resize_observer.spec.js +1 -1
- package/src/scss/utilities.scss +22 -0
- package/src/scss/utility-mixins/spacing.scss +14 -0
- package/src/utils/test_utils.js +4 -1
package/dist/utils/test_utils.js
CHANGED
|
@@ -7,7 +7,9 @@ function setStoryTimeout(fn, timeout) {
|
|
|
7
7
|
} // adopted this method from Bootstraps utils
|
|
8
8
|
// https://github.com/bootstrap-vue/bootstrap-vue/blob/2fd03f0b1d0cc41f9930078ba8b1c16b10e4ac2f/tests/utils.js#L6
|
|
9
9
|
|
|
10
|
-
const waitForAnimationFrame = () => new Promise(resolve =>
|
|
10
|
+
const waitForAnimationFrame = () => new Promise(resolve => {
|
|
11
|
+
requestAnimationFrame(resolve);
|
|
12
|
+
});
|
|
11
13
|
const getResetAnimationsCSS = () => `
|
|
12
14
|
*, *::after, *::before {
|
|
13
15
|
-webkit-transition: none !important;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.2.2",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@popperjs/core": "^2.11.2",
|
|
59
59
|
"bootstrap-vue": "2.20.1",
|
|
60
|
-
"dompurify": "^2.3.
|
|
60
|
+
"dompurify": "^2.3.7",
|
|
61
61
|
"echarts": "^5.2.1",
|
|
62
62
|
"iframe-resizer": "^4.3.2",
|
|
63
63
|
"lodash": "^4.17.20",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"@arkweid/lefthook": "0.7.7",
|
|
82
82
|
"@babel/core": "^7.10.2",
|
|
83
83
|
"@babel/preset-env": "^7.10.2",
|
|
84
|
-
"@gitlab/eslint-plugin": "12.0
|
|
84
|
+
"@gitlab/eslint-plugin": "12.2.0",
|
|
85
85
|
"@gitlab/stylelint-config": "4.0.0",
|
|
86
|
-
"@gitlab/svgs": "2.
|
|
86
|
+
"@gitlab/svgs": "2.14.0",
|
|
87
87
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
89
89
|
"@rollup/plugin-replace": "^2.3.2",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import { nextTick } from 'vue';
|
|
3
|
+
import { createMockDirective } from '~helpers/vue_mock_directive';
|
|
3
4
|
import Breadcrumb, { COLLAPSE_AT_SIZE } from './breadcrumb.vue';
|
|
4
5
|
import GlBreadcrumbItem from './breadcrumb_item.vue';
|
|
5
|
-
import { createMockDirective } from '~helpers/vue_mock_directive';
|
|
6
6
|
|
|
7
7
|
describe('Breadcrumb component', () => {
|
|
8
8
|
let wrapper;
|
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
|
|
26
26
|
.form-control {
|
|
27
27
|
+ .invalid-feedback,
|
|
28
|
-
+ .text-gl-muted
|
|
28
|
+
+ .text-gl-muted,
|
|
29
|
+
&.is-valid + .invalid-feedback + .text-gl-muted {
|
|
30
|
+
// See https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2806
|
|
31
|
+
// for the reasoning behind the "valid+invalid" selector above
|
|
29
32
|
@include gl-mt-3;
|
|
30
33
|
}
|
|
31
34
|
}
|
|
@@ -81,7 +81,7 @@ export const WithValidations = (_args, { argTypes }) => ({
|
|
|
81
81
|
invalidFeedback() {
|
|
82
82
|
let feedbackText = 'This field is required.';
|
|
83
83
|
|
|
84
|
-
if (this.name.length
|
|
84
|
+
if (this.name.length >= 4) {
|
|
85
85
|
feedbackText = '';
|
|
86
86
|
} else if (this.name.length > 0) {
|
|
87
87
|
feedbackText = 'Enter at least 4 characters.';
|
|
@@ -10,7 +10,7 @@ describe('GlKeysetPagination', () => {
|
|
|
10
10
|
const buttonTagName = 'BUTTON';
|
|
11
11
|
const linkTagName = 'A';
|
|
12
12
|
|
|
13
|
-
const createComponent = (props = {}, scopedSlots) => {
|
|
13
|
+
const createComponent = (props = {}, scopedSlots = {}) => {
|
|
14
14
|
wrapper = mount(GlKeysetPagination, {
|
|
15
15
|
propsData: props,
|
|
16
16
|
scopedSlots,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import { BModal } from 'bootstrap-vue';
|
|
3
3
|
import { merge } from 'lodash';
|
|
4
|
+
import { modalButtonDefaults } from '~/utils/constants';
|
|
4
5
|
import CloseButton from '../../shared_components/close_button/close_button.vue';
|
|
5
6
|
import Button from '../button/button.vue';
|
|
6
7
|
import { logWarning } from '../../../utils/utils';
|
|
7
8
|
import Modal from './modal.vue';
|
|
8
|
-
import { modalButtonDefaults } from '~/utils/constants';
|
|
9
9
|
|
|
10
10
|
const BModalStub = merge({}, BModal.options, {
|
|
11
11
|
methods: {
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
150
150
|
|
|
151
151
|
<ul class="list-group list-group-flush list-unstyled">
|
|
152
152
|
<li v-for="listItem in paginatedList" :key="listItem[itemKey]" class="list-group-item">
|
|
153
|
-
<slot :
|
|
153
|
+
<slot :list-item="listItem" :query="queryStr">{{ listItem.id }}</slot>
|
|
154
154
|
</li>
|
|
155
155
|
</ul>
|
|
156
156
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils';
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
|
-
import Pagination from './pagination.vue';
|
|
4
3
|
import { breakpoints } from '~/utils/breakpoints';
|
|
4
|
+
import Pagination from './pagination.vue';
|
|
5
5
|
|
|
6
6
|
jest.mock('lodash/debounce', () => jest.fn((fn) => fn));
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import ClearIcon from '~/components/shared_components/clear_icon_button/clear_icon_button.vue';
|
|
2
3
|
import GlDropdownItem from '../dropdown/dropdown_item.vue';
|
|
3
4
|
import GlFormInput from '../form/form_input/form_input.vue';
|
|
4
5
|
import SearchBoxByClick from './search_box_by_click.vue';
|
|
5
|
-
import ClearIcon from '~/components/shared_components/clear_icon_button/clear_icon_button.vue';
|
|
6
6
|
|
|
7
7
|
const GlFormInputGroupStub = {
|
|
8
8
|
template: `
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
237
237
|
@click="selectHistoryItem(item)"
|
|
238
238
|
>
|
|
239
239
|
<!-- @slot Slot to customize history item in history dropdown. Used only with history-items prop -->
|
|
240
|
-
<slot name="history-item" :
|
|
240
|
+
<slot name="history-item" :history-item="item">{{ item }}</slot>
|
|
241
241
|
</gl-dropdown-item>
|
|
242
242
|
<gl-dropdown-divider />
|
|
243
243
|
<gl-dropdown-item ref="clearHistory" @click="emitClearHistory">{{
|
|
@@ -269,7 +269,7 @@ export default {
|
|
|
269
269
|
data-testid="filtered-search-clear-button"
|
|
270
270
|
@click="clearInput"
|
|
271
271
|
/>
|
|
272
|
-
<template #append
|
|
272
|
+
<template #append>
|
|
273
273
|
<gl-button
|
|
274
274
|
v-bind="searchButtonAttributes"
|
|
275
275
|
ref="searchButton"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mount, shallowMount } from '@vue/test-utils';
|
|
2
|
+
import ClearIcon from '~/components/shared_components/clear_icon_button/clear_icon_button.vue';
|
|
2
3
|
import LoadingIcon from '../loading_icon/loading_icon.vue';
|
|
3
4
|
import SearchBoxByType from './search_box_by_type.vue';
|
|
4
|
-
import ClearIcon from '~/components/shared_components/clear_icon_button/clear_icon_button.vue';
|
|
5
5
|
|
|
6
6
|
const modelEvent = SearchBoxByType.model.event;
|
|
7
7
|
const newValue = 'new value';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils';
|
|
2
2
|
import { range, mapValues } from 'lodash';
|
|
3
|
+
import { useMockResizeObserver } from '~helpers/mock_dom_observer';
|
|
3
4
|
import GlTab from '../tab/tab.vue';
|
|
4
5
|
import GlScrollableTabs from './scrollable_tabs.vue';
|
|
5
6
|
import GlTabs from './tabs.vue';
|
|
6
|
-
import { useMockResizeObserver } from '~helpers/mock_dom_observer';
|
|
7
7
|
|
|
8
8
|
const { NAV_CLASS } = GlScrollableTabs;
|
|
9
9
|
const TEST_WIDTH = 600;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import { keyboard } from '~/utils/constants';
|
|
3
4
|
import GlToken from '../token/token.vue';
|
|
4
5
|
import GlTokenContainer from './token_container.vue';
|
|
5
|
-
import { keyboard } from '~/utils/constants';
|
|
6
6
|
|
|
7
7
|
describe('GlTokenContainer', () => {
|
|
8
8
|
const tokens = [
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
4
|
+
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
3
5
|
import Chart from '../chart/chart.vue';
|
|
4
6
|
import ChartLegend from '../legend/legend.vue';
|
|
5
7
|
import AreaChart from './area.vue';
|
|
6
8
|
|
|
7
|
-
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
8
|
-
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
9
|
-
|
|
10
9
|
let mockChartInstance;
|
|
11
10
|
|
|
12
11
|
jest.mock('echarts', () => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import Chart from '../chart/chart.vue';
|
|
3
|
-
import BarChart from './bar.vue';
|
|
4
2
|
import TooltipDefaultFormat from '~/components/shared_components/charts/tooltip_default_format.vue';
|
|
5
3
|
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
4
|
+
import Chart from '../chart/chart.vue';
|
|
5
|
+
import BarChart from './bar.vue';
|
|
6
6
|
|
|
7
7
|
let mockChartInstance;
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import * as echarts from 'echarts';
|
|
3
|
-
import Chart from './chart.vue';
|
|
4
3
|
import createTheme from '~/utils/charts/theme';
|
|
5
4
|
import { useMockResizeObserver } from '~helpers/mock_dom_observer';
|
|
5
|
+
import Chart from './chart.vue';
|
|
6
6
|
|
|
7
7
|
const defaultHeight = 400;
|
|
8
8
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
2
3
|
import {
|
|
3
4
|
mockDefaultLineData,
|
|
4
5
|
mockDefaultBarData,
|
|
@@ -6,7 +7,6 @@ import {
|
|
|
6
7
|
} from '../../../utils/charts/mock_data';
|
|
7
8
|
import Chart from '../chart/chart.vue';
|
|
8
9
|
import ColumnChart from './column.vue';
|
|
9
|
-
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
10
10
|
|
|
11
11
|
let mockChartInstance;
|
|
12
12
|
|
|
@@ -28,7 +28,7 @@ describe('column chart component', () => {
|
|
|
28
28
|
const findTooltip = () => wrapper.findComponent(ChartTooltipStub);
|
|
29
29
|
const getChartOptions = () => findChart().props('options');
|
|
30
30
|
|
|
31
|
-
const factory = (props = defaultChartProps, slots) => {
|
|
31
|
+
const factory = (props = defaultChartProps, slots = {}) => {
|
|
32
32
|
wrapper = shallowMount(ColumnChart, {
|
|
33
33
|
propsData: { ...props },
|
|
34
34
|
stubs: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
2
3
|
import { gaugeSafeHues, gaugeWarningHue } from '../../../utils/charts/theme';
|
|
3
4
|
import Chart from '../chart/chart.vue';
|
|
4
5
|
import GlGauge from './gauge.vue';
|
|
5
|
-
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
6
6
|
|
|
7
7
|
const placeholder = '--';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import { TOOLTIP_LEFT_OFFSET } from '~/utils/charts/constants';
|
|
4
|
+
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
3
5
|
import Chart from '../chart/chart.vue';
|
|
4
6
|
import ChartTooltip from '../tooltip/tooltip.vue';
|
|
5
7
|
import HeatMapChart from './heatmap.vue';
|
|
6
|
-
import { TOOLTIP_LEFT_OFFSET } from '~/utils/charts/constants';
|
|
7
|
-
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
8
8
|
|
|
9
9
|
let mockChartInstance;
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
2
3
|
import Chart from '../chart/chart.vue';
|
|
3
4
|
import GlChartSeriesLabel from '../series_label/series_label.vue';
|
|
4
5
|
import Legend from './legend.vue';
|
|
5
|
-
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
6
6
|
|
|
7
7
|
let mockChartInstance;
|
|
8
8
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
4
|
+
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
3
5
|
import Chart from '../chart/chart.vue';
|
|
4
6
|
import ChartLegend from '../legend/legend.vue';
|
|
5
7
|
import LineChart from './line.vue';
|
|
6
8
|
|
|
7
|
-
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
8
|
-
|
|
9
|
-
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
10
|
-
|
|
11
9
|
let mockChartInstance;
|
|
12
10
|
|
|
13
11
|
jest.mock('echarts', () => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import Chart from '../chart/chart.vue';
|
|
3
|
-
import SparklineChart from './sparkline.vue';
|
|
4
2
|
import { waitForAnimationFrame } from '~/utils/test_utils';
|
|
5
3
|
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
4
|
+
import Chart from '../chart/chart.vue';
|
|
5
|
+
import SparklineChart from './sparkline.vue';
|
|
6
6
|
|
|
7
7
|
let mockChartInstance;
|
|
8
8
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
+
import TooltipDefaultFormat from '~/components/shared_components/charts/tooltip_default_format.vue';
|
|
4
|
+
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
5
|
+
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
3
6
|
import {
|
|
4
7
|
mockDefaultStackedLineData,
|
|
5
8
|
mockDefaultStackedBarData,
|
|
@@ -9,10 +12,6 @@ import Chart from '../chart/chart.vue';
|
|
|
9
12
|
import ChartLegend from '../legend/legend.vue';
|
|
10
13
|
import * as themeUtils from '../../../utils/charts/theme';
|
|
11
14
|
import StackedColumnChart from './stacked_column.vue';
|
|
12
|
-
import TooltipDefaultFormat from '~/components/shared_components/charts/tooltip_default_format.vue';
|
|
13
|
-
|
|
14
|
-
import { createMockChartInstance, ChartTooltipStub } from '~helpers/chart_stubs';
|
|
15
|
-
import { LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '~/utils/charts/constants';
|
|
16
15
|
|
|
17
16
|
let mockChartInstance;
|
|
18
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
2
3
|
import GlPopover from '../../base/popover/popover.vue';
|
|
3
4
|
import { popoverPlacements } from '../../../utils/constants';
|
|
4
5
|
import ChartTooltip from './tooltip.vue';
|
|
5
|
-
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
6
6
|
|
|
7
7
|
let mockChartInstance;
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import GlAnimatedNumber from './animated_number.vue';
|
|
3
2
|
import { waitForAnimationFrame } from '~/utils/test_utils';
|
|
3
|
+
import GlAnimatedNumber from './animated_number.vue';
|
|
4
4
|
|
|
5
5
|
const duration = 2000;
|
|
6
6
|
const ACTION_ANIMATED = 'animated';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import GlIntersectionObserver from './intersection_observer.vue';
|
|
3
2
|
import useMockIntersectionObserver from '~/utils/use_mock_intersection_observer';
|
|
3
|
+
import GlIntersectionObserver from './intersection_observer.vue';
|
|
4
4
|
|
|
5
5
|
const TEST_SLOT = '<p>Hello world! Lorem ipsum.</p>';
|
|
6
6
|
const ENTRY_INTERSECTING = { ratio: 0.75, isIntersecting: true };
|