Commit e2a6b74f authored by peterhegman's avatar peterhegman

Update skeleton loader snapshot

To account for changes to `GLSkeletonLoader`
parent 7d6a27e2
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Resizable Skeleton Loader default setup renders the bars, labels, and grid with correct position, size, and rx percentages 1`] = `
<gl-skeleton-loader-stub
baseurl=""
<svg
class="gl-skeleton-loader"
preserveAspectRatio="xMidYMid meet"
version="1.1"
viewBox="0 0 400 130"
>
<rect
clip-path="url(#null-idClip)"
height="130"
preserveaspectratio="xMidYMid meet"
style="fill: url(#null-idGradient);"
width="400"
>
x="0"
y="0"
/>
<defs>
<clippath
id="null-idClip"
>
<rect
data-testid="skeleton-chart-grid"
height="1px"
......@@ -158,17 +170,67 @@ exports[`Resizable Skeleton Loader default setup renders the bars, labels, and g
x="89.125%"
y="95%"
/>
</gl-skeleton-loader-stub>
</clippath>
<lineargradient
id="null-idGradient"
>
<stop
class="primary-stop"
offset="0%"
>
<animate
attributeName="offset"
dur="1s"
repeatCount="indefinite"
values="-2; 1"
/>
</stop>
<stop
class="secondary-stop"
offset="50%"
>
<animate
attributeName="offset"
dur="1s"
repeatCount="indefinite"
values="-1.5; 1.5"
/>
</stop>
<stop
class="primary-stop"
offset="100%"
>
<animate
attributeName="offset"
dur="1s"
repeatCount="indefinite"
values="-1; 2"
/>
</stop>
</lineargradient>
</defs>
</svg>
`;
exports[`Resizable Skeleton Loader with custom settings renders the correct position, and size percentages for bars and labels with different settings 1`] = `
<gl-skeleton-loader-stub
baseurl=""
<svg
class="gl-skeleton-loader"
preserveAspectRatio="xMidYMid meet"
version="1.1"
viewBox="0 0 400 130"
>
<rect
clip-path="url(#-idClip)"
height="130"
preserveaspectratio="xMidYMid meet"
uniquekey=""
style="fill: url(#-idGradient);"
width="400"
>
x="0"
y="0"
/>
<defs>
<clippath
id="-idClip"
>
<rect
data-testid="skeleton-chart-grid"
height="1px"
......@@ -320,5 +382,44 @@ exports[`Resizable Skeleton Loader with custom settings renders the correct posi
x="88.9375%"
y="98%"
/>
</gl-skeleton-loader-stub>
</clippath>
<lineargradient
id="-idGradient"
>
<stop
class="primary-stop"
offset="0%"
>
<animate
attributeName="offset"
dur="1s"
repeatCount="indefinite"
values="-2; 1"
/>
</stop>
<stop
class="secondary-stop"
offset="50%"
>
<animate
attributeName="offset"
dur="1s"
repeatCount="indefinite"
values="-1.5; 1.5"
/>
</stop>
<stop
class="primary-stop"
offset="100%"
>
<animate
attributeName="offset"
dur="1s"
repeatCount="indefinite"
values="-1; 2"
/>
</stop>
</lineargradient>
</defs>
</svg>
`;
import { shallowMount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import ChartSkeletonLoader from '~/vue_shared/components/resizable_chart/skeleton_loader.vue';
describe('Resizable Skeleton Loader', () => {
let wrapper;
const createComponent = (propsData = {}) => {
wrapper = shallowMount(ChartSkeletonLoader, {
wrapper = mount(ChartSkeletonLoader, {
propsData,
});
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment