|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 |
| -exports[`Spinner spec diffs snapshots with different colors 1`] = ` |
4 |
| -"Snapshot Diff: |
5 |
| -- First value |
6 |
| -+ Second value |
| 3 | +exports[`Spinner spec matches snapshot 1`] = ` |
| 4 | +<DocumentFragment> |
| 5 | + <svg |
| 6 | + class="vtex__icon-spinner c-action-primary " |
| 7 | + height="40" |
| 8 | + preserveAspectRatio="xMidYMid" |
| 9 | + viewBox="0 0 100 100" |
| 10 | + width="40" |
| 11 | + xmlns="http://www.w3.org/2000/svg" |
| 12 | + > |
| 13 | + <style> |
| 14 | + |
| 15 | + @keyframes vtex-spinner-rotate { |
| 16 | + from { |
| 17 | + transform-origin: 50% 50%; |
| 18 | + transform: rotate(0deg); |
| 19 | + } |
| 20 | + to { |
| 21 | + transform-origin: 50% 50%; |
| 22 | + transform: rotate(360deg); |
| 23 | + } |
| 24 | + } |
7 | 25 |
|
8 |
| -@@ -41,11 +41,11 @@ |
9 |
| - class=\\"vtex-spinner_circle\\" |
10 |
| - cx=\\"50\\" |
11 |
| - cy=\\"50\\" |
12 |
| - fill=\\"none\\" |
13 |
| - r=\\"40\\" |
14 |
| -- stroke=\\"#000\\" |
15 |
| -+ stroke=\\"#fff\\" |
16 |
| - stroke-dasharray=\\"0 0 188.49555921538757 251.32741228718345\\" |
17 |
| - stroke-dashoffset=\\"1\\" |
18 |
| - stroke-linecap=\\"round\\" |
19 |
| - stroke-width=\\"10\\" |
20 |
| - />" |
| 26 | + @keyframes vtex-spinner-fill { |
| 27 | + 0% { |
| 28 | + stroke-dasharray: 0 0 2 251.32741228718345; |
| 29 | + } |
| 30 | + 50% { |
| 31 | + stroke-dasharray: 0 0 188.49555921538757 251.32741228718345; |
| 32 | + } |
| 33 | + 100% { |
| 34 | + stroke-dasharray: 0 249.32741228718345 188.49555921538757 251.32741228718345; |
| 35 | + } |
| 36 | + } |
| 37 | +
|
| 38 | + .vtex-spinner_circle { |
| 39 | + animation: vtex-spinner-fill 1.25s infinite cubic-bezier(0.455, 0.030, 0.515, 0.955), vtex-spinner-rotate 0.625s infinite linear; |
| 40 | + } |
| 41 | + |
| 42 | + </style> |
| 43 | + <circle |
| 44 | + class="vtex-spinner_circle" |
| 45 | + cx="50" |
| 46 | + cy="50" |
| 47 | + fill="none" |
| 48 | + r="40" |
| 49 | + stroke="currentColor" |
| 50 | + stroke-dasharray="0 0 188.49555921538757 251.32741228718345" |
| 51 | + stroke-dashoffset="1" |
| 52 | + stroke-linecap="round" |
| 53 | + stroke-width="10" |
| 54 | + /> |
| 55 | + </svg> |
| 56 | +</DocumentFragment> |
21 | 57 | `;
|
22 | 58 |
|
23 |
| -exports[`Spinner spec diffs snapshots with different sizes 1`] = ` |
24 |
| -"Snapshot Diff: |
25 |
| -- First value |
26 |
| -+ Second value |
| 59 | +exports[`Spinner spec renders with the correct color 1`] = ` |
| 60 | +<DocumentFragment> |
| 61 | + <svg |
| 62 | + class="vtex__icon-spinner " |
| 63 | + height="40" |
| 64 | + preserveAspectRatio="xMidYMid" |
| 65 | + viewBox="0 0 100 100" |
| 66 | + width="40" |
| 67 | + xmlns="http://www.w3.org/2000/svg" |
| 68 | + > |
| 69 | + <style> |
| 70 | + |
| 71 | + @keyframes vtex-spinner-rotate { |
| 72 | + from { |
| 73 | + transform-origin: 50% 50%; |
| 74 | + transform: rotate(0deg); |
| 75 | + } |
| 76 | + to { |
| 77 | + transform-origin: 50% 50%; |
| 78 | + transform: rotate(360deg); |
| 79 | + } |
| 80 | + } |
27 | 81 |
|
28 |
| -@@ -1,12 +1,12 @@ |
29 |
| - <DocumentFragment> |
30 |
| - <svg |
31 |
| - class=\\"vtex__icon-spinner c-action-primary \\" |
32 |
| -- height=\\"50\\" |
33 |
| -+ height=\\"100\\" |
34 |
| - preserveAspectRatio=\\"xMidYMid\\" |
35 |
| - viewBox=\\"0 0 100 100\\" |
36 |
| -- width=\\"50\\" |
37 |
| -+ width=\\"100\\" |
38 |
| - xmlns=\\"http://www.w3.org/2000/svg\\" |
39 |
| - > |
40 |
| - <style> |
41 |
| - |
42 |
| - @keyframes vtex-spinner-rotate {" |
| 82 | + @keyframes vtex-spinner-fill { |
| 83 | + 0% { |
| 84 | + stroke-dasharray: 0 0 2 251.32741228718345; |
| 85 | + } |
| 86 | + 50% { |
| 87 | + stroke-dasharray: 0 0 188.49555921538757 251.32741228718345; |
| 88 | + } |
| 89 | + 100% { |
| 90 | + stroke-dasharray: 0 249.32741228718345 188.49555921538757 251.32741228718345; |
| 91 | + } |
| 92 | + } |
| 93 | +
|
| 94 | + .vtex-spinner_circle { |
| 95 | + animation: vtex-spinner-fill 1.25s infinite cubic-bezier(0.455, 0.030, 0.515, 0.955), vtex-spinner-rotate 0.625s infinite linear; |
| 96 | + } |
| 97 | + |
| 98 | + </style> |
| 99 | + <circle |
| 100 | + class="vtex-spinner_circle" |
| 101 | + cx="50" |
| 102 | + cy="50" |
| 103 | + fill="none" |
| 104 | + r="40" |
| 105 | + stroke="#000" |
| 106 | + stroke-dasharray="0 0 188.49555921538757 251.32741228718345" |
| 107 | + stroke-dashoffset="1" |
| 108 | + stroke-linecap="round" |
| 109 | + stroke-width="10" |
| 110 | + /> |
| 111 | + </svg> |
| 112 | +</DocumentFragment> |
43 | 113 | `;
|
44 | 114 |
|
45 |
| -exports[`Spinner spec matches snapshot 1`] = ` |
| 115 | +exports[`Spinner spec renders with the correct size 1`] = ` |
46 | 116 | <DocumentFragment>
|
47 | 117 | <svg
|
48 | 118 | class="vtex__icon-spinner c-action-primary "
|
49 |
| - height="40" |
| 119 | + height="100" |
50 | 120 | preserveAspectRatio="xMidYMid"
|
51 | 121 | viewBox="0 0 100 100"
|
52 |
| - width="40" |
| 122 | + width="100" |
53 | 123 | xmlns="http://www.w3.org/2000/svg"
|
54 | 124 | >
|
55 | 125 | <style>
|
|
0 commit comments