Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3c6f87

Browse files
authored
test: update snapshots (anuraghazra#2519)
1 parent8898d01 commita3c6f87

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

‎src/cards/wakatime-card.js

Lines changed: 25 additions & 1 deletion
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
returncreateTextNode({
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

‎tests/__snapshots__/renderWakatimeCard.test.js.snap

Lines changed: 44 additions & 0 deletions
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 1sease-in-outforwards;
91+
}
92+
.lang-progress{
93+
animation:growWidthAnimation 0.6sease-in-outforwards;
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 1sease-in-outforwards;
271+
}
272+
.lang-progress{
273+
animation:growWidthAnimation 0.6sease-in-outforwards;
274+
}
231275
232276
233277

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp