Skip to content

Commit

Permalink
test: update snapshots (anuraghazra#2519)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa authored and dev-onejun committed Mar 3, 2023
1 parent 2d6cdb7 commit fd2734d
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/cards/wakatime-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const createTextNode = ({
// @ts-ignore
name: label,
progressBarBackgroundColor,
delay: staggerDelay + 300,
});

return `
Expand Down Expand Up @@ -276,11 +277,12 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
} else {
finalLayout = flexLayout({
items: filteredLanguages.length
? filteredLanguages.map((language) => {
? filteredLanguages.map((language, index) => {
return createTextNode({
id: language.name,
label: language.name,
value: language.text,
index: index,
percent: language.percent,
// @ts-ignore
progressBarColor: titleColor,
Expand Down Expand Up @@ -321,7 +323,29 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
card.setCSS(
`
${cssStyles}
@keyframes slideInAnimation {
from {
width: 0;
}
to {
width: calc(100%-100px);
}
}
@keyframes growWidthAnimation {
from {
width: 0;
}
to {
width: 100%;
}
}
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
#rect-mask rect{
animation: slideInAnimation 1s ease-in-out forwards;
}
.lang-progress{
animation: growWidthAnimation 0.6s ease-in-out forwards;
}
`,
);

Expand Down
44 changes: 44 additions & 0 deletions tests/__snapshots__/renderWakatimeCard.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,29 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
}
@keyframes slideInAnimation {
from {
width: 0;
}
to {
width: calc(100%-100px);
}
}
@keyframes growWidthAnimation {
from {
width: 0;
}
to {
width: 100%;
}
}
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
#rect-mask rect{
animation: slideInAnimation 1s ease-in-out forwards;
}
.lang-progress{
animation: growWidthAnimation 0.6s ease-in-out forwards;
}
Expand Down Expand Up @@ -227,7 +249,29 @@ exports[`Test Render Wakatime Card should render correctly with compact layout w
}
@keyframes slideInAnimation {
from {
width: 0;
}
to {
width: calc(100%-100px);
}
}
@keyframes growWidthAnimation {
from {
width: 0;
}
to {
width: 100%;
}
}
.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: #434d58 }
#rect-mask rect{
animation: slideInAnimation 1s ease-in-out forwards;
}
.lang-progress{
animation: growWidthAnimation 0.6s ease-in-out forwards;
}
Expand Down

0 comments on commit fd2734d

Please sign in to comment.