Skip to content

Commit 4dfc2e4

Browse files
committed
badge-maker: migrate to pretext for measurement
1 parent 8949c46 commit 4dfc2e4

File tree

6 files changed

+383
-91
lines changed

6 files changed

+383
-91
lines changed

__snapshots__/make-badge.spec.js

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,7 @@ exports['The badge generator "for-the-badge" template badge generation should ma
15581558
exports['The badge generator "social" template badge generation should match snapshots: message/label, no logo 1'] = `
15591559
<svg
15601560
xmlns="http://www.w3.org/2000/svg"
1561-
width="95"
1561+
width="89"
15621562
height="20"
15631563
role="img"
15641564
aria-label="Cactus: grown"
@@ -1587,13 +1587,13 @@ exports['The badge generator "social" template badge generation should match sna
15871587
fill="#fcfcfc"
15881588
x="0.5"
15891589
y="0.5"
1590-
width="47"
1590+
width="45"
15911591
height="19"
15921592
rx="2"
15931593
/>
1594-
<rect x="53.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
1595-
<rect x="53" y="7.5" width="0.5" height="5" stroke="#fafafa" />
1596-
<path d="M53.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
1594+
<rect x="51.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
1595+
<rect x="51" y="7.5" width="0.5" height="5" stroke="#fafafa" />
1596+
<path d="M51.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
15971597
</g>
15981598
<g
15991599
aria-hidden="true"
@@ -1611,32 +1611,32 @@ exports['The badge generator "social" template badge generation should match sna
16111611
fill="url(#a)"
16121612
x=".5"
16131613
y=".5"
1614-
width="47"
1614+
width="45"
16151615
height="19"
16161616
rx="2"
16171617
/>
16181618
<text
16191619
aria-hidden="true"
1620-
x="235"
1620+
x="225"
16211621
y="150"
16221622
fill="#fff"
16231623
transform="scale(.1)"
1624-
textLength="370"
1624+
textLength="350"
16251625
>
16261626
Cactus
16271627
</text>
1628-
<text x="235" y="140" transform="scale(.1)" textLength="370">Cactus</text>
1628+
<text x="225" y="140" transform="scale(.1)" textLength="350">Cactus</text>
16291629
<text
16301630
aria-hidden="true"
1631-
x="735"
1631+
x="695"
16321632
y="150"
16331633
fill="#fff"
16341634
transform="scale(.1)"
1635-
textLength="330"
1635+
textLength="290"
16361636
>
16371637
grown
16381638
</text>
1639-
<text id="rlink" x="735" y="140" transform="scale(.1)" textLength="330">
1639+
<text id="rlink" x="695" y="140" transform="scale(.1)" textLength="290">
16401640
grown
16411641
</text>
16421642
</g>
@@ -1647,7 +1647,7 @@ exports['The badge generator "social" template badge generation should match sna
16471647
exports['The badge generator "social" template badge generation should match snapshots: message/label, with logo 1'] = `
16481648
<svg
16491649
xmlns="http://www.w3.org/2000/svg"
1650-
width="112"
1650+
width="106"
16511651
height="20"
16521652
role="img"
16531653
aria-label="Cactus: grown"
@@ -1676,13 +1676,13 @@ exports['The badge generator "social" template badge generation should match sna
16761676
fill="#fcfcfc"
16771677
x="0.5"
16781678
y="0.5"
1679-
width="64"
1679+
width="62"
16801680
height="19"
16811681
rx="2"
16821682
/>
1683-
<rect x="70.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
1684-
<rect x="70" y="7.5" width="0.5" height="5" stroke="#fafafa" />
1685-
<path d="M70.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
1683+
<rect x="68.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
1684+
<rect x="68" y="7.5" width="0.5" height="5" stroke="#fafafa" />
1685+
<path d="M68.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
16861686
</g>
16871687
<image
16881688
x="5"
@@ -1707,32 +1707,32 @@ exports['The badge generator "social" template badge generation should match sna
17071707
fill="url(#a)"
17081708
x=".5"
17091709
y=".5"
1710-
width="64"
1710+
width="62"
17111711
height="19"
17121712
rx="2"
17131713
/>
17141714
<text
17151715
aria-hidden="true"
1716-
x="405"
1716+
x="395"
17171717
y="150"
17181718
fill="#fff"
17191719
transform="scale(.1)"
1720-
textLength="370"
1720+
textLength="350"
17211721
>
17221722
Cactus
17231723
</text>
1724-
<text x="405" y="140" transform="scale(.1)" textLength="370">Cactus</text>
1724+
<text x="395" y="140" transform="scale(.1)" textLength="350">Cactus</text>
17251725
<text
17261726
aria-hidden="true"
1727-
x="905"
1727+
x="865"
17281728
y="150"
17291729
fill="#fff"
17301730
transform="scale(.1)"
1731-
textLength="330"
1731+
textLength="290"
17321732
>
17331733
grown
17341734
</text>
1735-
<text id="rlink" x="905" y="140" transform="scale(.1)" textLength="330">
1735+
<text id="rlink" x="865" y="140" transform="scale(.1)" textLength="290">
17361736
grown
17371737
</text>
17381738
</g>
@@ -1743,7 +1743,7 @@ exports['The badge generator "social" template badge generation should match sna
17431743
exports['The badge generator "social" template badge generation should match snapshots: message only, no logo 1'] = `
17441744
<svg
17451745
xmlns="http://www.w3.org/2000/svg"
1746-
width="59"
1746+
width="55"
17471747
height="20"
17481748
role="img"
17491749
aria-label="grown"
@@ -1776,7 +1776,7 @@ exports['The badge generator "social" template badge generation should match sna
17761776
height="19"
17771777
rx="2"
17781778
/>
1779-
<rect x="17.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
1779+
<rect x="17.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
17801780
<rect x="17" y="7.5" width="0.5" height="5" stroke="#fafafa" />
17811781
<path d="M17.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
17821782
</g>
@@ -1811,15 +1811,15 @@ exports['The badge generator "social" template badge generation should match sna
18111811
<text x="55" y="140" transform="scale(.1)" textLength="10"></text>
18121812
<text
18131813
aria-hidden="true"
1814-
x="375"
1814+
x="355"
18151815
y="150"
18161816
fill="#fff"
18171817
transform="scale(.1)"
1818-
textLength="330"
1818+
textLength="290"
18191819
>
18201820
grown
18211821
</text>
1822-
<text id="rlink" x="375" y="140" transform="scale(.1)" textLength="330">
1822+
<text id="rlink" x="355" y="140" transform="scale(.1)" textLength="290">
18231823
grown
18241824
</text>
18251825
</g>
@@ -1830,7 +1830,7 @@ exports['The badge generator "social" template badge generation should match sna
18301830
exports['The badge generator "social" template badge generation should match snapshots: message only, with logo 1'] = `
18311831
<svg
18321832
xmlns="http://www.w3.org/2000/svg"
1833-
width="73"
1833+
width="69"
18341834
height="20"
18351835
role="img"
18361836
aria-label="grown"
@@ -1863,7 +1863,7 @@ exports['The badge generator "social" template badge generation should match sna
18631863
height="19"
18641864
rx="2"
18651865
/>
1866-
<rect x="31.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
1866+
<rect x="31.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
18671867
<rect x="31" y="7.5" width="0.5" height="5" stroke="#fafafa" />
18681868
<path d="M31.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
18691869
</g>
@@ -1905,15 +1905,15 @@ exports['The badge generator "social" template badge generation should match sna
19051905
<text x="195" y="140" transform="scale(.1)" textLength="10"></text>
19061906
<text
19071907
aria-hidden="true"
1908-
x="515"
1908+
x="495"
19091909
y="150"
19101910
fill="#fff"
19111911
transform="scale(.1)"
1912-
textLength="330"
1912+
textLength="290"
19131913
>
19141914
grown
19151915
</text>
1916-
<text id="rlink" x="515" y="140" transform="scale(.1)" textLength="330">
1916+
<text id="rlink" x="495" y="140" transform="scale(.1)" textLength="290">
19171917
grown
19181918
</text>
19191919
</g>
@@ -1924,7 +1924,7 @@ exports['The badge generator "social" template badge generation should match sna
19241924
exports['The badge generator "social" template badge generation should match snapshots: message only, with logo and labelColor 1'] = `
19251925
<svg
19261926
xmlns="http://www.w3.org/2000/svg"
1927-
width="73"
1927+
width="69"
19281928
height="20"
19291929
role="img"
19301930
aria-label="grown"
@@ -1957,7 +1957,7 @@ exports['The badge generator "social" template badge generation should match sna
19571957
height="19"
19581958
rx="2"
19591959
/>
1960-
<rect x="31.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
1960+
<rect x="31.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
19611961
<rect x="31" y="7.5" width="0.5" height="5" stroke="#fafafa" />
19621962
<path d="M31.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
19631963
</g>
@@ -1999,15 +1999,15 @@ exports['The badge generator "social" template badge generation should match sna
19991999
<text x="195" y="140" transform="scale(.1)" textLength="10"></text>
20002000
<text
20012001
aria-hidden="true"
2002-
x="515"
2002+
x="495"
20032003
y="150"
20042004
fill="#fff"
20052005
transform="scale(.1)"
2006-
textLength="330"
2006+
textLength="290"
20072007
>
20082008
grown
20092009
</text>
2010-
<text id="rlink" x="515" y="140" transform="scale(.1)" textLength="330">
2010+
<text id="rlink" x="495" y="140" transform="scale(.1)" textLength="290">
20112011
grown
20122012
</text>
20132013
</g>
@@ -2016,7 +2016,7 @@ exports['The badge generator "social" template badge generation should match sna
20162016
`
20172017

20182018
exports['The badge generator "social" template badge generation should match snapshots: message/label, with links 1'] = `
2019-
<svg xmlns="http://www.w3.org/2000/svg" width="95" height="20">
2019+
<svg xmlns="http://www.w3.org/2000/svg" width="89" height="20">
20202020
<style>
20212021
a:hover #llink {
20222022
fill: url(#b);
@@ -2040,13 +2040,13 @@ exports['The badge generator "social" template badge generation should match sna
20402040
fill="#fcfcfc"
20412041
x="0.5"
20422042
y="0.5"
2043-
width="47"
2043+
width="45"
20442044
height="19"
20452045
rx="2"
20462046
/>
2047-
<rect x="53.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
2048-
<rect x="53" y="7.5" width="0.5" height="5" stroke="#fafafa" />
2049-
<path d="M53.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
2047+
<rect x="51.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
2048+
<rect x="51" y="7.5" width="0.5" height="5" stroke="#fafafa" />
2049+
<path d="M51.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
20502050
</g>
20512051
<g
20522052
aria-hidden="false"
@@ -2061,39 +2061,39 @@ exports['The badge generator "social" template badge generation should match sna
20612061
<a target="_blank" href="https://shields.io/">
20622062
<text
20632063
aria-hidden="true"
2064-
x="235"
2064+
x="225"
20652065
y="150"
20662066
fill="#fff"
20672067
transform="scale(.1)"
2068-
textLength="370"
2068+
textLength="350"
20692069
>
20702070
Cactus
20712071
</text>
2072-
<text x="235" y="140" transform="scale(.1)" textLength="370">Cactus</text>
2072+
<text x="225" y="140" transform="scale(.1)" textLength="350">Cactus</text>
20732073
<rect
20742074
id="llink"
20752075
stroke="#d5d5d5"
20762076
fill="url(#a)"
20772077
x=".5"
20782078
y=".5"
2079-
width="47"
2079+
width="45"
20802080
height="19"
20812081
rx="2"
20822082
/>
20832083
</a>
20842084
<a target="_blank" href="https://www.google.co.uk/">
2085-
<rect width="42" x="53" height="20" fill="rgba(0,0,0,0)" />
2085+
<rect width="38" x="51" height="20" fill="rgba(0,0,0,0)" />
20862086
<text
20872087
aria-hidden="true"
2088-
x="735"
2088+
x="695"
20892089
y="150"
20902090
fill="#fff"
20912091
transform="scale(.1)"
2092-
textLength="330"
2092+
textLength="290"
20932093
>
20942094
grown
20952095
</text>
2096-
<text id="rlink" x="735" y="140" transform="scale(.1)" textLength="330">
2096+
<text id="rlink" x="695" y="140" transform="scale(.1)" textLength="290">
20972097
grown
20982098
</text>
20992099
</a>
@@ -2326,7 +2326,7 @@ exports['The badge generator "for-the-badge" template badge generation should ma
23262326
exports['The badge generator "social" template badge generation should match snapshots: message with custom suffix 1'] = `
23272327
<svg
23282328
xmlns="http://www.w3.org/2000/svg"
2329-
width="112"
2329+
width="106"
23302330
height="20"
23312331
role="img"
23322332
aria-label="Cactus: grown"
@@ -2355,13 +2355,13 @@ exports['The badge generator "social" template badge generation should match sna
23552355
fill="#fcfcfc"
23562356
x="0.5"
23572357
y="0.5"
2358-
width="64"
2358+
width="62"
23592359
height="19"
23602360
rx="2"
23612361
/>
2362-
<rect x="70.5" y="0.5" width="41" height="19" rx="2" fill="#fafafa" />
2363-
<rect x="70" y="7.5" width="0.5" height="5" stroke="#fafafa" />
2364-
<path d="M70.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
2362+
<rect x="68.5" y="0.5" width="37" height="19" rx="2" fill="#fafafa" />
2363+
<rect x="68" y="7.5" width="0.5" height="5" stroke="#fafafa" />
2364+
<path d="M68.5 6.5 l-3 3v1 l3 3" fill="#fafafa" />
23652365
</g>
23662366
<image
23672367
x="5"
@@ -2386,32 +2386,32 @@ exports['The badge generator "social" template badge generation should match sna
23862386
fill="url(#a1)"
23872387
x=".5"
23882388
y=".5"
2389-
width="64"
2389+
width="62"
23902390
height="19"
23912391
rx="2"
23922392
/>
23932393
<text
23942394
aria-hidden="true"
2395-
x="405"
2395+
x="395"
23962396
y="150"
23972397
fill="#fff"
23982398
transform="scale(.1)"
2399-
textLength="370"
2399+
textLength="350"
24002400
>
24012401
Cactus
24022402
</text>
2403-
<text x="405" y="140" transform="scale(.1)" textLength="370">Cactus</text>
2403+
<text x="395" y="140" transform="scale(.1)" textLength="350">Cactus</text>
24042404
<text
24052405
aria-hidden="true"
2406-
x="905"
2406+
x="865"
24072407
y="150"
24082408
fill="#fff"
24092409
transform="scale(.1)"
2410-
textLength="330"
2410+
textLength="290"
24112411
>
24122412
grown
24132413
</text>
2414-
<text id="rlink1" x="905" y="140" transform="scale(.1)" textLength="330">
2414+
<text id="rlink1" x="865" y="140" transform="scale(.1)" textLength="290">
24152415
grown
24162416
</text>
24172417
</g>

0 commit comments

Comments
 (0)