Skip to content

Commit fd2734d

Browse files
rickstaadev-onejun
authored andcommitted
test: update snapshots (anuraghazra#2519)
1 parent 2d6cdb7 commit fd2734d

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

Diff for: src/cards/wakatime-card.js

+25-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const createTextNode = ({
118118
// @ts-ignore
119119
name: label,
120120
progressBarBackgroundColor,
121+
delay: staggerDelay + 300,
121122
});
122123

123124
return `
@@ -276,11 +277,12 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
276277
} else {
277278
finalLayout = flexLayout({
278279
items: filteredLanguages.length
279-
? filteredLanguages.map((language) => {
280+
? filteredLanguages.map((language, index) => {
280281
return createTextNode({
281282
id: language.name,
282283
label: language.name,
283284
value: language.text,
285+
index: index,
284286
percent: language.percent,
285287
// @ts-ignore
286288
progressBarColor: titleColor,
@@ -321,7 +323,29 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
321323
card.setCSS(
322324
`
323325
${cssStyles}
326+
@keyframes slideInAnimation {
327+
from {
328+
width: 0;
329+
}
330+
to {
331+
width: calc(100%-100px);
332+
}
333+
}
334+
@keyframes growWidthAnimation {
335+
from {
336+
width: 0;
337+
}
338+
to {
339+
width: 100%;
340+
}
341+
}
324342
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
343+
#rect-mask rect{
344+
animation: slideInAnimation 1s ease-in-out forwards;
345+
}
346+
.lang-progress{
347+
animation: growWidthAnimation 0.6s ease-in-out forwards;
348+
}
325349
`,
326350
);
327351

Diff for: tests/__snapshots__/renderWakatimeCard.test.js.snap

+44
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,29 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
6969
}
7070
7171
72+
@keyframes slideInAnimation {
73+
from {
74+
width: 0;
75+
}
76+
to {
77+
width: calc(100%-100px);
78+
}
79+
}
80+
@keyframes growWidthAnimation {
81+
from {
82+
width: 0;
83+
}
84+
to {
85+
width: 100%;
86+
}
87+
}
7288
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
89+
#rect-mask rect{
90+
animation: slideInAnimation 1s ease-in-out forwards;
91+
}
92+
.lang-progress{
93+
animation: growWidthAnimation 0.6s ease-in-out forwards;
94+
}
7395
7496
7597
@@ -227,7 +249,29 @@ exports[`Test Render Wakatime Card should render correctly with compact layout w
227249
}
228250
229251
252+
@keyframes slideInAnimation {
253+
from {
254+
width: 0;
255+
}
256+
to {
257+
width: calc(100%-100px);
258+
}
259+
}
260+
@keyframes growWidthAnimation {
261+
from {
262+
width: 0;
263+
}
264+
to {
265+
width: 100%;
266+
}
267+
}
230268
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
269+
#rect-mask rect{
270+
animation: slideInAnimation 1s ease-in-out forwards;
271+
}
272+
.lang-progress{
273+
animation: growWidthAnimation 0.6s ease-in-out forwards;
274+
}
231275
232276
233277

0 commit comments

Comments
 (0)