Skip to content

Commit c41a3a1

Browse files
Artur-claude
andcommitted
test: add screenshot and DOM snapshot tests for breadcrumb component
Add comprehensive test coverage including: - Visual regression tests for base and Lumo themes - DOM snapshot tests for component structure - Tests for various states (hover, focus, disabled) - RTL support tests - Tests for different breadcrumb configurations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 98ebc02 commit c41a3a1

28 files changed

+838
-0
lines changed
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
/* @web/test-runner snapshot v1 */
2+
export const snapshots = {};
3+
4+
snapshots["vaadin-breadcrumb breadcrumb host default"] =
5+
`<vaadin-breadcrumb
6+
aria-label="Breadcrumb"
7+
role="navigation"
8+
>
9+
<vaadin-breadcrumb-item
10+
href="/"
11+
role="listitem"
12+
>
13+
Home
14+
</vaadin-breadcrumb-item>
15+
<vaadin-breadcrumb-item
16+
href="/products"
17+
role="listitem"
18+
>
19+
Products
20+
</vaadin-breadcrumb-item>
21+
<vaadin-breadcrumb-item role="listitem">
22+
Current Page
23+
</vaadin-breadcrumb-item>
24+
</vaadin-breadcrumb>
25+
`;
26+
/* end snapshot vaadin-breadcrumb breadcrumb host default */
27+
28+
snapshots["vaadin-breadcrumb breadcrumb host focused"] =
29+
`<vaadin-breadcrumb
30+
aria-label="Breadcrumb"
31+
role="navigation"
32+
>
33+
<vaadin-breadcrumb-item
34+
href="/"
35+
role="listitem"
36+
>
37+
Home
38+
</vaadin-breadcrumb-item>
39+
<vaadin-breadcrumb-item
40+
href="/products"
41+
role="listitem"
42+
>
43+
Products
44+
</vaadin-breadcrumb-item>
45+
<vaadin-breadcrumb-item role="listitem">
46+
Current Page
47+
</vaadin-breadcrumb-item>
48+
</vaadin-breadcrumb>
49+
`;
50+
/* end snapshot vaadin-breadcrumb breadcrumb host focused */
51+
52+
snapshots["vaadin-breadcrumb breadcrumb host focus-ring"] =
53+
`<vaadin-breadcrumb
54+
aria-label="Breadcrumb"
55+
role="navigation"
56+
>
57+
<vaadin-breadcrumb-item
58+
current=""
59+
href="/"
60+
role="listitem"
61+
>
62+
Home
63+
</vaadin-breadcrumb-item>
64+
<vaadin-breadcrumb-item
65+
href="/products"
66+
role="listitem"
67+
>
68+
Products
69+
</vaadin-breadcrumb-item>
70+
<vaadin-breadcrumb-item
71+
last=""
72+
role="listitem"
73+
>
74+
Current Page
75+
</vaadin-breadcrumb-item>
76+
</vaadin-breadcrumb>
77+
`;
78+
/* end snapshot vaadin-breadcrumb breadcrumb host focus-ring */
79+
80+
snapshots["vaadin-breadcrumb breadcrumb shadow default"] =
81+
`<ol
82+
part="list"
83+
role="list"
84+
>
85+
<slot>
86+
</slot>
87+
</ol>
88+
`;
89+
/* end snapshot vaadin-breadcrumb breadcrumb shadow default */
90+
91+
snapshots["vaadin-breadcrumb-item item host default with href"] =
92+
`<vaadin-breadcrumb-item
93+
href="/products"
94+
role="listitem"
95+
>
96+
Products
97+
</vaadin-breadcrumb-item>
98+
`;
99+
/* end snapshot vaadin-breadcrumb-item item host default with href */
100+
101+
snapshots["vaadin-breadcrumb-item item host default without href"] =
102+
`<vaadin-breadcrumb-item role="listitem">
103+
Current Page
104+
</vaadin-breadcrumb-item>
105+
`;
106+
/* end snapshot vaadin-breadcrumb-item item host default without href */
107+
108+
snapshots["vaadin-breadcrumb-item item host disabled"] =
109+
`<vaadin-breadcrumb-item
110+
aria-disabled="true"
111+
disabled=""
112+
href="/products"
113+
role="listitem"
114+
>
115+
Products
116+
</vaadin-breadcrumb-item>
117+
`;
118+
/* end snapshot vaadin-breadcrumb-item item host disabled */
119+
120+
snapshots["vaadin-breadcrumb-item item host with target"] =
121+
`<vaadin-breadcrumb-item
122+
href="https://vaadin.com"
123+
role="listitem"
124+
target="_blank"
125+
>
126+
Vaadin
127+
</vaadin-breadcrumb-item>
128+
`;
129+
/* end snapshot vaadin-breadcrumb-item item host with target */
130+
131+
snapshots["vaadin-breadcrumb-item item host router-ignore"] =
132+
`<vaadin-breadcrumb-item
133+
href="/api"
134+
role="listitem"
135+
router-ignore=""
136+
>
137+
API
138+
</vaadin-breadcrumb-item>
139+
`;
140+
/* end snapshot vaadin-breadcrumb-item item host router-ignore */
141+
142+
snapshots["vaadin-breadcrumb-item item host focused"] =
143+
`<vaadin-breadcrumb-item
144+
href="/products"
145+
role="listitem"
146+
>
147+
Products
148+
</vaadin-breadcrumb-item>
149+
`;
150+
/* end snapshot vaadin-breadcrumb-item item host focused */
151+
152+
snapshots["vaadin-breadcrumb-item item host focus-ring"] =
153+
`<vaadin-breadcrumb-item
154+
href="/products"
155+
role="listitem"
156+
>
157+
Products
158+
</vaadin-breadcrumb-item>
159+
`;
160+
/* end snapshot vaadin-breadcrumb-item item host focus-ring */
161+
162+
snapshots["vaadin-breadcrumb-item item host last item with href"] =
163+
`<vaadin-breadcrumb-item
164+
href="/products"
165+
role="listitem"
166+
>
167+
Products
168+
</vaadin-breadcrumb-item>
169+
`;
170+
/* end snapshot vaadin-breadcrumb-item item host last item with href */
171+
172+
snapshots["vaadin-breadcrumb-item item host last item without href"] =
173+
`<vaadin-breadcrumb-item role="listitem">
174+
Current Page
175+
</vaadin-breadcrumb-item>
176+
`;
177+
/* end snapshot vaadin-breadcrumb-item item host last item without href */
178+
179+
snapshots["vaadin-breadcrumb-item item host current"] =
180+
`<vaadin-breadcrumb-item
181+
href="/"
182+
role="listitem"
183+
>
184+
Home
185+
</vaadin-breadcrumb-item>
186+
`;
187+
/* end snapshot vaadin-breadcrumb-item item host current */
188+
189+
snapshots["vaadin-breadcrumb-item item shadow default with href"] =
190+
`<a
191+
aria-current="false"
192+
href="/products"
193+
part="link"
194+
tabindex="0"
195+
>
196+
<slot>
197+
</slot>
198+
</a>
199+
<span
200+
aria-hidden="true"
201+
part="separator"
202+
>
203+
</span>
204+
`;
205+
/* end snapshot vaadin-breadcrumb-item item shadow default with href */
206+
207+
snapshots["vaadin-breadcrumb-item item shadow default without href"] =
208+
`<span
209+
aria-current="false"
210+
part="link"
211+
>
212+
<slot>
213+
</slot>
214+
</span>
215+
<span
216+
aria-hidden="true"
217+
part="separator"
218+
>
219+
</span>
220+
`;
221+
/* end snapshot vaadin-breadcrumb-item item shadow default without href */
222+
223+
snapshots["vaadin-breadcrumb-item item shadow disabled"] =
224+
`<a
225+
aria-current="false"
226+
part="link"
227+
tabindex="-1"
228+
>
229+
<slot>
230+
</slot>
231+
</a>
232+
<span
233+
aria-hidden="true"
234+
part="separator"
235+
>
236+
</span>
237+
`;
238+
/* end snapshot vaadin-breadcrumb-item item shadow disabled */
239+
240+
snapshots["vaadin-breadcrumb-item item shadow last item with href"] =
241+
`<a
242+
aria-current="false"
243+
href="/products"
244+
part="link"
245+
tabindex="0"
246+
>
247+
<slot>
248+
</slot>
249+
</a>
250+
<span
251+
aria-hidden="true"
252+
part="separator"
253+
>
254+
</span>
255+
`;
256+
/* end snapshot vaadin-breadcrumb-item item shadow last item with href */
257+
258+
snapshots["vaadin-breadcrumb-item item shadow last item without href"] =
259+
`<span
260+
aria-current="false"
261+
part="link"
262+
>
263+
<slot>
264+
</slot>
265+
</span>
266+
<span
267+
aria-hidden="true"
268+
part="separator"
269+
>
270+
</span>
271+
`;
272+
/* end snapshot vaadin-breadcrumb-item item shadow last item without href */
273+

0 commit comments

Comments
 (0)