@gitlab/ui 40.2.1 → 40.4.0
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 +22 -0
- package/dist/components/base/alert/alert.js +1 -0
- package/dist/components/base/avatar/avatar.js +27 -11
- 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 +2 -2
- 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 +2 -2
- package/src/components/base/alert/alert.vue +1 -0
- package/src/components/base/avatar/avatar.scss +143 -7
- package/src/components/base/avatar/avatar.spec.js +32 -6
- package/src/components/base/avatar/avatar.stories.js +16 -0
- package/src/components/base/avatar/avatar.vue +30 -11
- 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.scss +32 -0
- package/src/components/base/markdown/markdown.stories.js +6 -3
- package/src/components/base/markdown/markdown.vue +1 -0
- package/src/components/base/markdown/markdown_typescale_demo.html +46 -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 +18 -0
- package/src/scss/utility-mixins/box-shadow.scss +9 -0
- package/src/utils/test_utils.js +4 -1
|
@@ -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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { createMockDirective, getBinding } from '~helpers/vue_mock_directive';
|
|
2
3
|
import { POSITION } from './constants';
|
|
3
4
|
import Truncate from './truncate.vue';
|
|
4
|
-
import { createMockDirective, getBinding } from '~helpers/vue_mock_directive';
|
|
5
5
|
|
|
6
6
|
const removeSpecialChar = (text) => {
|
|
7
7
|
return text.replace(/‎|\u200E/gi, '');
|
|
@@ -36,7 +36,9 @@ describe('hover load directive', () => {
|
|
|
36
36
|
createComponent(mockHandleLoad);
|
|
37
37
|
|
|
38
38
|
findTarget().trigger('mouseover');
|
|
39
|
-
await new Promise((resolve) =>
|
|
39
|
+
await new Promise((resolve) => {
|
|
40
|
+
setTimeout(resolve, hoverDuration);
|
|
41
|
+
});
|
|
40
42
|
findTarget().trigger('mouseout');
|
|
41
43
|
|
|
42
44
|
if (hoverDuration < 100) {
|
|
@@ -12,7 +12,10 @@ describe('outside directive', () => {
|
|
|
12
12
|
// to guarantee it. So, we use 2ms, which seems to eliminate the flakiness.
|
|
13
13
|
// Jest's fake timers unfortunately do not seem to affect event timestamps,
|
|
14
14
|
// so can't be used here.
|
|
15
|
-
const delay = (ms = 2) =>
|
|
15
|
+
const delay = (ms = 2) =>
|
|
16
|
+
new Promise((resolve) => {
|
|
17
|
+
setTimeout(resolve, ms);
|
|
18
|
+
});
|
|
16
19
|
const find = (testid) => wrapper.find(`[data-testid="${testid}"]`);
|
|
17
20
|
|
|
18
21
|
const defaultTemplate = `
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { GlResizeObserverDirective } from './resize_observer';
|
|
3
2
|
import { useMockResizeObserver } from '~helpers/mock_dom_observer';
|
|
3
|
+
import { GlResizeObserverDirective } from './resize_observer';
|
|
4
4
|
|
|
5
5
|
describe('resize observer directive', () => {
|
|
6
6
|
const { trigger, observersCount, observesElement } = useMockResizeObserver();
|
package/src/scss/utilities.scss
CHANGED
|
@@ -1760,6 +1760,24 @@
|
|
|
1760
1760
|
inset 0 -#{$gl-border-size-1} 0 0 $gray-200 !important
|
|
1761
1761
|
}
|
|
1762
1762
|
|
|
1763
|
+
.gl-inset-border-y-1-gray-100 {
|
|
1764
|
+
box-shadow: inset 0 #{$gl-border-size-1} 0 0 $gray-100,
|
|
1765
|
+
inset 0 -#{$gl-border-size-1} 0 0 $gray-100
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.gl-inset-border-y-1-gray-100\! {
|
|
1769
|
+
box-shadow: inset 0 #{$gl-border-size-1} 0 0 $gray-100,
|
|
1770
|
+
inset 0 -#{$gl-border-size-1} 0 0 $gray-100 !important
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
.gl-inset-border-b-1-gray-100 {
|
|
1774
|
+
box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
.gl-inset-border-b-1-gray-100\! {
|
|
1778
|
+
box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100 !important
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1763
1781
|
.gl-inset-border-b-2-gray-100 {
|
|
1764
1782
|
box-shadow: inset 0 -#{$gl-border-size-2} 0 0 $gray-100
|
|
1765
1783
|
}
|
|
@@ -36,6 +36,15 @@
|
|
|
36
36
|
inset 0 -#{$gl-border-size-1} 0 0 $gray-200;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
@mixin gl-inset-border-y-1-gray-100 {
|
|
40
|
+
box-shadow: inset 0 #{$gl-border-size-1} 0 0 $gray-100,
|
|
41
|
+
inset 0 -#{$gl-border-size-1} 0 0 $gray-100;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin gl-inset-border-b-1-gray-100 {
|
|
45
|
+
box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100;
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
@mixin gl-inset-border-b-2-gray-100 {
|
|
40
49
|
box-shadow: inset 0 -#{$gl-border-size-2} 0 0 $gray-100;
|
|
41
50
|
}
|
package/src/utils/test_utils.js
CHANGED
|
@@ -8,7 +8,10 @@ export function setStoryTimeout(fn, timeout) {
|
|
|
8
8
|
|
|
9
9
|
// adopted this method from Bootstraps utils
|
|
10
10
|
// https://github.com/bootstrap-vue/bootstrap-vue/blob/2fd03f0b1d0cc41f9930078ba8b1c16b10e4ac2f/tests/utils.js#L6
|
|
11
|
-
export const waitForAnimationFrame = () =>
|
|
11
|
+
export const waitForAnimationFrame = () =>
|
|
12
|
+
new Promise((resolve) => {
|
|
13
|
+
requestAnimationFrame(resolve);
|
|
14
|
+
});
|
|
12
15
|
|
|
13
16
|
export const getResetAnimationsCSS = () => `
|
|
14
17
|
*, *::after, *::before {
|