Skip to content

Commit bf97057

Browse files
authored
test: add QRCode unit testing (#6441)
1 parent 637656b commit bf97057

File tree

3 files changed

+128658
-0
lines changed

3 files changed

+128658
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`renders ./components/qrcode/demo/base.vue correctly 1`] = `
4+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
5+
<!----><canvas style="height: 134px; width: 134px;"></canvas>
6+
<!---->
7+
</div>
8+
`;
9+
10+
exports[`renders ./components/qrcode/demo/customColor.vue correctly 1`] = `
11+
<div class="ant-space css-dev-only-do-not-override-1gbr67s ant-space-horizontal ant-space-align-center">
12+
<div class="ant-space-item" style="margin-right: 8px;">
13+
<div>
14+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
15+
<!----><canvas style="height: 134px; width: 134px;"></canvas>
16+
<!---->
17+
</div>
18+
</div>
19+
</div>
20+
<!---->
21+
<div class="ant-space-item">
22+
<div>
23+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
24+
<!----><canvas style="height: 134px; width: 134px;"></canvas>
25+
<!---->
26+
</div>
27+
</div>
28+
</div>
29+
<!---->
30+
</div>
31+
`;
32+
33+
exports[`renders ./components/qrcode/demo/customSize.vue correctly 1`] = `
34+
<div class="ant-btn-group css-dev-only-do-not-override-1gbr67s"><button class="css-dev-only-do-not-override-1gbr67s ant-btn ant-btn-default" type="button"><span role="img" aria-label="minus" class="anticon anticon-minus"><svg focusable="false" class="" data-icon="minus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"></path></svg></span><span>samll</span></button><button class="css-dev-only-do-not-override-1gbr67s ant-btn ant-btn-default" type="button"><span role="img" aria-label="plus" class="anticon anticon-plus"><svg focusable="false" class="" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span><span>large</span></button></div>
35+
<br>
36+
<br>
37+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
38+
<!----><canvas style="height: 134px; width: 134px;"></canvas><img src="https://www.antdv.com/assets/logo.1ef800a8.svg" style="display: none;">
39+
</div>
40+
`;
41+
42+
exports[`renders ./components/qrcode/demo/download.vue correctly 1`] = `
43+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
44+
<!----><canvas style="height: 134px; width: 134px;"></canvas>
45+
<!---->
46+
</div>
47+
<br>
48+
<br>
49+
<button class="css-dev-only-do-not-override-1gbr67s ant-btn ant-btn-primary" type="button">
50+
<!----><span>Downlaod</span>
51+
</button>
52+
`;
53+
54+
exports[`renders ./components/qrcode/demo/errorLevel.vue correctly 1`] = `
55+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
56+
<!----><canvas style="height: 134px; width: 134px;"></canvas>
57+
<!---->
58+
</div>
59+
<br>
60+
<br>
61+
<div class="ant-segmented css-dev-only-do-not-override-1gbr67s">
62+
<div class="ant-segmented-group">
63+
<!----><label class="ant-segmented-item ant-segmented-item-selected"><input class="ant-segmented-item-input" type="radio">
64+
<div class="ant-segmented-item-label" title="L">L</div>
65+
</label><label class="ant-segmented-item"><input class="ant-segmented-item-input" type="radio">
66+
<div class="ant-segmented-item-label" title="M">M</div>
67+
</label><label class="ant-segmented-item"><input class="ant-segmented-item-input" type="radio">
68+
<div class="ant-segmented-item-label" title="Q">Q</div>
69+
</label><label class="ant-segmented-item"><input class="ant-segmented-item-input" type="radio">
70+
<div class="ant-segmented-item-label" title="H">H</div>
71+
</label>
72+
</div>
73+
</div>
74+
`;
75+
76+
exports[`renders ./components/qrcode/demo/icon.vue correctly 1`] = `
77+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
78+
<!----><canvas style="height: 134px; width: 134px;"></canvas><img src="https://www.antdv.com/assets/logo.1ef800a8.svg" style="display: none;">
79+
</div>
80+
`;
81+
82+
exports[`renders ./components/qrcode/demo/popover.vue correctly 1`] = `<img width="100" height="100" src="https://aliyuncdn.antdv.com/logo.png">`;
83+
84+
exports[`renders ./components/qrcode/demo/status.vue correctly 1`] = `
85+
<div class="ant-space css-dev-only-do-not-override-1gbr67s ant-space-horizontal ant-space-align-center">
86+
<div class="ant-space-item" style="margin-right: 8px;">
87+
<div>
88+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
89+
<div class="ant-qrcode-mask">
90+
<div class="css-dev-only-do-not-override-1gbr67s ant-spin ant-spin-spinning" aria-live="polite" aria-busy="true"><span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span>
91+
<!---->
92+
</div>
93+
<!---->
94+
</div><canvas style="height: 134px; width: 134px;"></canvas>
95+
<!---->
96+
</div>
97+
</div>
98+
</div>
99+
<!---->
100+
<div class="ant-space-item">
101+
<div>
102+
<div style="width: 160px; height: 160px;" class="css-dev-only-do-not-override-1gbr67s ant-qrcode">
103+
<div class="ant-qrcode-mask">
104+
<!---->
105+
<p class="ant-qrcode-expired">QR code expired</p><button class="css-dev-only-do-not-override-1gbr67s ant-btn ant-btn-link" type="button"><span role="img" aria-label="reload" class="anticon anticon-reload"><svg focusable="false" class="" data-icon="reload" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"></path></svg></span><span>Refresh</span></button>
106+
</div><canvas style="height: 134px; width: 134px;"></canvas>
107+
<!---->
108+
</div>
109+
</div>
110+
</div>
111+
<!---->
112+
</div>
113+
`;

0 commit comments

Comments
 (0)