@sapudex/web-components 2.32.1 → 2.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/fixtures/masthead-shell.ts +281 -0
- package/cypress/specs/Breadcrumbs.cy.tsx +196 -1
- package/cypress/specs/FilterMenu.cy.tsx +53 -0
- package/cypress/specs/ListItem.cy.tsx +48 -0
- package/cypress/specs/MastheadMenu.cy.tsx +564 -0
- package/cypress/specs/MastheadMobileMenu.cy.tsx +573 -0
- package/cypress/specs/MastheadShell.cy.tsx +645 -0
- package/cypress/specs/SecondaryNavigationDesktop.cy.tsx +289 -95
- package/cypress/specs/SecondaryNavigationMobile.cy.tsx +42 -0
- package/cypress/specs/SelectBox.cy.tsx +63 -0
- package/cypress/specs/TabNavigation.cy.tsx +431 -10
- package/cypress/support/component-imports.instrumented.ts +14 -0
- package/cypress/support/component-imports.src.ts +10 -0
- package/dist/Breadcrumbs.d.ts +12 -0
- package/dist/Breadcrumbs.js +30 -6
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BreadcrumbsPopoverTemplate.js +10 -1
- package/dist/BreadcrumbsPopoverTemplate.js.map +1 -1
- package/dist/BreadcrumbsTemplate.js +1 -1
- package/dist/BreadcrumbsTemplate.js.map +1 -1
- package/dist/ListItem.d.ts +3 -0
- package/dist/ListItem.js +10 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +29 -0
- package/dist/ListItemBase.js +22 -0
- package/dist/ListItemBase.js.map +1 -1
- package/dist/MastheadItem.d.ts +2 -1
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadMenu.d.ts +2 -1
- package/dist/MastheadMenu.js.map +1 -1
- package/dist/SearchableListBase.d.ts +3 -1
- package/dist/SearchableListBase.js +7 -1
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SecondaryNavigation.d.ts +1 -6
- package/dist/SecondaryNavigation.js +6 -59
- package/dist/SecondaryNavigation.js.map +1 -1
- package/dist/SecondaryNavigationItem.d.ts +5 -12
- package/dist/SecondaryNavigationItem.js +34 -65
- package/dist/SecondaryNavigationItem.js.map +1 -1
- package/dist/SecondaryNavigationItemBase.d.ts +0 -1
- package/dist/SecondaryNavigationItemBase.js +0 -4
- package/dist/SecondaryNavigationItemBase.js.map +1 -1
- package/dist/SelectBase.js +4 -2
- package/dist/SelectBase.js.map +1 -1
- package/dist/Tab.d.ts +19 -0
- package/dist/Tab.js +22 -0
- package/dist/Tab.js.map +1 -1
- package/dist/TabNavigation.d.ts +9 -1
- package/dist/TabNavigation.js +25 -7
- package/dist/TabNavigation.js.map +1 -1
- package/dist/assets/{InputSuggestions-DeXhpK0F.js → InputSuggestions-Bz7HZXUc.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-jMEdrC07.js → ListItemStandardExpandableTextTemplate-CjE7hAvu.js} +1 -1
- package/dist/assets/{bundle-S1uYREqT.css → bundle-JYo3bV8v.css} +1 -1
- package/dist/assets/{bundle.esm-CwJAt93x.js → bundle.esm-mAR7ytdB.js} +217 -217
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BreadcrumbsPopover.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/MastheadMenu.css +1 -1
- package/dist/css/themes/MastheadMobileMenu.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/css/themes/TabNavigation.css +1 -1
- package/dist/custom-elements-internal.json +1357 -212
- package/dist/custom-elements.json +1342 -197
- package/dist/generated/templates/ListItemTemplate.lit.js +32 -28
- package/dist/generated/templates/ListItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadMenuTemplate.lit.js +8 -1
- package/dist/generated/templates/MastheadMenuTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js +10 -4
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SearchableListBaseTemplate.lit.js +3 -3
- package/dist/generated/templates/SearchableListBaseTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationItemTemplate.lit.js +4 -4
- package/dist/generated/templates/SecondaryNavigationItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationSubItemTemplate.lit.js +3 -3
- package/dist/generated/templates/SecondaryNavigationSubItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SecondaryNavigationTemplate.lit.js +5 -5
- package/dist/generated/templates/SecondaryNavigationTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SelectBoxTemplate.lit.js +12 -10
- package/dist/generated/templates/SelectBoxTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabHeaderTemplate.lit.js +40 -24
- package/dist/generated/templates/TabHeaderTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TabNavigationTemplate.lit.js +1 -1
- package/dist/generated/templates/TabNavigationTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.d.ts +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BreadcrumbsPopover.css.d.ts +1 -1
- package/dist/generated/themes/BreadcrumbsPopover.css.js +1 -1
- package/dist/generated/themes/BreadcrumbsPopover.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.d.ts +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/MastheadMenu.css.d.ts +1 -1
- package/dist/generated/themes/MastheadMenu.css.js +1 -1
- package/dist/generated/themes/MastheadMenu.css.js.map +1 -1
- package/dist/generated/themes/MastheadMobileMenu.css.d.ts +1 -1
- package/dist/generated/themes/MastheadMobileMenu.css.js +1 -1
- package/dist/generated/themes/MastheadMobileMenu.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/generated/themes/TabNavigation.css.d.ts +1 -1
- package/dist/generated/themes/TabNavigation.css.js +1 -1
- package/dist/generated/themes/TabNavigation.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +236 -1
- package/dist/web-types.json +393 -3
- package/package.json +1 -1
- package/src/Breadcrumbs.ts +26 -7
- package/src/BreadcrumbsPopoverTemplate.tsx +53 -41
- package/src/BreadcrumbsTemplate.tsx +35 -21
- package/src/ListItem.hbs +42 -14
- package/src/ListItem.ts +12 -1
- package/src/ListItemBase.ts +40 -0
- package/src/MastheadItem.ts +2 -1
- package/src/MastheadMenu.hbs +35 -0
- package/src/MastheadMenu.ts +2 -1
- package/src/MastheadMobileMenu.hbs +40 -9
- package/src/SearchableListBase.hbs +12 -0
- package/src/SearchableListBase.ts +11 -2
- package/src/SecondaryNavigation.hbs +6 -6
- package/src/SecondaryNavigation.ts +7 -66
- package/src/SecondaryNavigationItem.hbs +4 -6
- package/src/SecondaryNavigationItem.ts +40 -83
- package/src/SecondaryNavigationItemBase.ts +0 -3
- package/src/SecondaryNavigationSubItem.hbs +3 -7
- package/src/SelectBase.ts +4 -2
- package/src/SelectBox.hbs +13 -5
- package/src/Tab.ts +32 -0
- package/src/TabHeader.hbs +40 -19
- package/src/TabNavigation.hbs +5 -9
- package/src/TabNavigation.ts +25 -8
- package/src/generated/templates/ListItemTemplate.lit.ts +32 -28
- package/src/generated/templates/MastheadMenuTemplate.lit.ts +8 -1
- package/src/generated/templates/MastheadMobileMenuTemplate.lit.ts +10 -4
- package/src/generated/templates/SearchableListBaseTemplate.lit.ts +3 -3
- package/src/generated/templates/SecondaryNavigationItemTemplate.lit.ts +4 -4
- package/src/generated/templates/SecondaryNavigationSubItemTemplate.lit.ts +3 -3
- package/src/generated/templates/SecondaryNavigationTemplate.lit.ts +5 -5
- package/src/generated/templates/SelectBoxTemplate.lit.ts +12 -10
- package/src/generated/templates/TabHeaderTemplate.lit.ts +40 -24
- package/src/generated/templates/TabNavigationTemplate.lit.ts +1 -1
- package/src/generated/themes/Breadcrumbs.css.ts +1 -1
- package/src/generated/themes/BreadcrumbsPopover.css.ts +1 -1
- package/src/generated/themes/ListItem.css.ts +1 -1
- package/src/generated/themes/MastheadMenu.css.ts +1 -1
- package/src/generated/themes/MastheadMobileMenu.css.ts +1 -1
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/generated/themes/TabNavigation.css.ts +1 -1
- package/src/themes/Breadcrumbs.css +6 -0
- package/src/themes/BreadcrumbsPopover.css +12 -2
- package/src/themes/ListItem.css +12 -5
- package/src/themes/MastheadMenu.css +45 -0
- package/src/themes/MastheadMobileMenu.css +45 -0
- package/src/themes/TabNavigation.css +58 -73
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
export const subItemsProduct = [{
|
|
2
|
+
"subMenuLinkItems": [
|
|
3
|
+
{
|
|
4
|
+
"category": "CRM",
|
|
5
|
+
"url": "https://sap.com",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"title": "SAP S/4HANA Cloud",
|
|
9
|
+
"url": "https://sap.com"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"title": "CRM 2 and Customer Experience",
|
|
13
|
+
"url": "https://sap.com"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"title": "Spend Management",
|
|
17
|
+
"url": "https://sap.com"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"title": "Supply Chain Management",
|
|
21
|
+
"url": "https://sap.com"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"title": "Human Capital Management",
|
|
25
|
+
"url": "https://sap.com"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"category": "Learning",
|
|
31
|
+
"items": [
|
|
32
|
+
{
|
|
33
|
+
"title": "SAP Learning Journeys",
|
|
34
|
+
"url": "https://sap.com"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Training Courses",
|
|
38
|
+
"url": "https://sap.com",
|
|
39
|
+
"externalLink": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"title": "SAP Certification",
|
|
43
|
+
"url": "https://sap.com"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"title": "SAP Learning Hub",
|
|
47
|
+
"url": "https://sap.com"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"title": "SAP Training and Adoption",
|
|
51
|
+
"url": "https://sap.com"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"category": "Community",
|
|
57
|
+
"url": "https://sap.com",
|
|
58
|
+
"items": [
|
|
59
|
+
{
|
|
60
|
+
"title": "Topics",
|
|
61
|
+
"url": "https://sap.com"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"title": "Questions and Answers",
|
|
65
|
+
"url": "https://sap.com"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"title": "Blogs",
|
|
69
|
+
"url": "https://sap.com"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
]}
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
export const subItemsExplore = [
|
|
77
|
+
{
|
|
78
|
+
"subMenuLinkItems": [
|
|
79
|
+
{
|
|
80
|
+
"category":"Products",
|
|
81
|
+
"url":"//www.sap.com/products.html",
|
|
82
|
+
"items":[
|
|
83
|
+
{
|
|
84
|
+
"externalLink":false,
|
|
85
|
+
"title":"Business Network",
|
|
86
|
+
"url":"//www.sap.com/products/business-network.html"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"externalLink":false,
|
|
90
|
+
"title":"Business Technology Platform",
|
|
91
|
+
"url":"//www.sap.com/products/technology-platform.html",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"externalLink":false,
|
|
95
|
+
"title":"CRM and Customer Experience",
|
|
96
|
+
"url":"//www.sap.com/products/crm.html",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"externalLink":false,
|
|
100
|
+
"title":"Enterprise Resource Planning",
|
|
101
|
+
"url":"//www.sap.com/products/erp.html",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"externalLink":false,
|
|
105
|
+
"title":"Financial Management",
|
|
106
|
+
"url":"//www.sap.com/products/financial-management.html",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"externalLink":false,
|
|
110
|
+
"title":"Human Capital Management",
|
|
111
|
+
"url":"//www.sap.com/products/hcm.html",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"externalLink":false,
|
|
115
|
+
"title":"Small and Midsize Enterprises",
|
|
116
|
+
"url":"//www.sap.com/products/sme-business-software.html",
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"category": "Services",
|
|
122
|
+
"url": "https://sap.com",
|
|
123
|
+
"items": [
|
|
124
|
+
{
|
|
125
|
+
"title": "Devtoberfest",
|
|
126
|
+
"url": "https://sap.com"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"title": "TechEd",
|
|
130
|
+
"url": "https://sap.com"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"title": "SAP Learning",
|
|
134
|
+
"url": "https://sap.com"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"title": "New Coffee Corner",
|
|
138
|
+
"url": "https://sap.com"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"category":"Learning and Support",
|
|
144
|
+
"items":[
|
|
145
|
+
{
|
|
146
|
+
"externalLink":false,
|
|
147
|
+
"title":"Learning and Certification",
|
|
148
|
+
"url":"https://learning.sap.com"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"externalLink":false,
|
|
152
|
+
"title":"Support",
|
|
153
|
+
"url":"https://support.sap.com"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"externalLink":false,
|
|
157
|
+
"title":"Documentation",
|
|
158
|
+
"url":"https://help.sap.com"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"externalLink":false,
|
|
162
|
+
"title":"Community",
|
|
163
|
+
"url":"https://community.sap.com/"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"category":"About",
|
|
169
|
+
"items":[
|
|
170
|
+
{
|
|
171
|
+
"externalLink":false,
|
|
172
|
+
"navTitle":"Company Information",
|
|
173
|
+
"title":"Company Information",
|
|
174
|
+
"url":"//www.sap.com/about/company.html"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"externalLink":false,
|
|
178
|
+
"title":"Careers",
|
|
179
|
+
"url":"https://jobs.sap.com/?utm_source=CareerSite&utm_campaign=CorpSite_HD"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"externalLink":false,
|
|
183
|
+
"title":"Customer Stories",
|
|
184
|
+
"url":"//www.sap.com/about/customer-stories.html"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"externalLink":false,
|
|
188
|
+
"title":"Events",
|
|
189
|
+
"url":"//www.sap.com/events.html"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"externalLink":false,
|
|
193
|
+
"title":"Investor Relations",
|
|
194
|
+
"url":"https://www.sap.com/investors/en.html"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"externalLink":false,
|
|
198
|
+
"title":"News Center",
|
|
199
|
+
"url":"https://news.sap.com/"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"externalLink":false,
|
|
203
|
+
"title":"Security and Trust",
|
|
204
|
+
"url":"//www.sap.com/about/trust-center.html"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
];
|
|
211
|
+
|
|
212
|
+
export const profileLinks = [
|
|
213
|
+
{
|
|
214
|
+
category: "Group heading1",
|
|
215
|
+
items: [
|
|
216
|
+
{
|
|
217
|
+
"title": "Lorem ipsum",
|
|
218
|
+
"url": "https://sap.com",
|
|
219
|
+
"externalLink": true
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"title": "Curabitur aliquam",
|
|
223
|
+
"url": "https://sap.com",
|
|
224
|
+
"badge": "72"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"title": "Sed sodales nisisuscipit",
|
|
228
|
+
"url": "https://sap.com"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"title": "Lorem ipsum dolor an example two lines",
|
|
232
|
+
"url": "https://sap.com",
|
|
233
|
+
"externalLink": true,
|
|
234
|
+
"badge": "73"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"title": "Lorem ipsum dolor sit anconsectetur",
|
|
238
|
+
"url": "https://sap.com",
|
|
239
|
+
"externalLink": true,
|
|
240
|
+
"badge": "37"
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
category: "Group heading2",
|
|
246
|
+
items: [
|
|
247
|
+
{
|
|
248
|
+
title: "Manage my account",
|
|
249
|
+
url: "http://sap.com/myaccount",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
title: "SAP Learning Journeys",
|
|
253
|
+
url: "https://sap.com",
|
|
254
|
+
externalLink: true,
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
title: "Training Courses",
|
|
258
|
+
url: "https://sap.com",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
title: "SAP Learning Hub",
|
|
262
|
+
url: "https://sap.com",
|
|
263
|
+
badge: "72",
|
|
264
|
+
externalLink: true,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
title: "SAP Training and Adoption",
|
|
268
|
+
url: "https://sap.com",
|
|
269
|
+
badge: "31"
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
];
|
|
274
|
+
|
|
275
|
+
export const profileLoggedInUser = {
|
|
276
|
+
name : "Damian Smith",
|
|
277
|
+
username : "damian.smith",
|
|
278
|
+
email : "damian.smith@sap.com",
|
|
279
|
+
avatarInitials: "JS",
|
|
280
|
+
avatarUrl: "./stories/list/image.png",
|
|
281
|
+
};
|
|
@@ -41,6 +41,25 @@ const breadcrumbsShowItemsHigher = <UDExBreadcrumbs
|
|
|
41
41
|
<UDExBreadcrumbsItem>Current Page</UDExBreadcrumbsItem>
|
|
42
42
|
</UDExBreadcrumbs>
|
|
43
43
|
|
|
44
|
+
const breadcrumbsShowCurrentPage = <UDExBreadcrumbs
|
|
45
|
+
id="breadcrumbs-show-current-page"
|
|
46
|
+
show-current-page
|
|
47
|
+
class="udex-breadcrumbs">
|
|
48
|
+
<UDExBreadcrumbsItem href="https://www.sap.com" target="_blank">First Level</UDExBreadcrumbsItem>
|
|
49
|
+
<UDExBreadcrumbsItem href="https://www.sap.com" target="_blank">Second Level</UDExBreadcrumbsItem>
|
|
50
|
+
<UDExBreadcrumbsItem>Current Page</UDExBreadcrumbsItem>
|
|
51
|
+
</UDExBreadcrumbs>
|
|
52
|
+
|
|
53
|
+
const breadcrumbsHideCurrentPage = <UDExBreadcrumbs
|
|
54
|
+
id="breadcrumbs-hide-current-page"
|
|
55
|
+
show-items="10"
|
|
56
|
+
class="udex-breadcrumbs">
|
|
57
|
+
<UDExBreadcrumbsItem href="https://www.sap.com" target="_blank">First Level</UDExBreadcrumbsItem>
|
|
58
|
+
<UDExBreadcrumbsItem href="https://www.sap.com" target="_blank">Second Level</UDExBreadcrumbsItem>
|
|
59
|
+
<UDExBreadcrumbsItem href="https://www.sap.com" target="_blank">Third Level</UDExBreadcrumbsItem>
|
|
60
|
+
<UDExBreadcrumbsItem>Current Page</UDExBreadcrumbsItem>
|
|
61
|
+
</UDExBreadcrumbs>
|
|
62
|
+
|
|
44
63
|
describe("Breadcrumbs", () => {
|
|
45
64
|
beforeEach(() => {
|
|
46
65
|
cy.mount(breadcrumbs);
|
|
@@ -90,7 +109,8 @@ describe("Breadcrumbs", () => {
|
|
|
90
109
|
cy.get("#breadcrumbs").shadow().find("[udex-dropdown]").should("have.attr", "open");
|
|
91
110
|
});
|
|
92
111
|
|
|
93
|
-
|
|
112
|
+
// Updated: description corrected — focus is on the trigger when Escape fires (not inside the dropdown); Escape is now handled by UI5 Popover natively, not by a custom _handleKeydown branch
|
|
113
|
+
it("returns focus to the trigger when the dropdown is closed with Escape", () => {
|
|
94
114
|
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
95
115
|
cy.get("body").realType("{esc}");
|
|
96
116
|
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").should("be.focused");
|
|
@@ -100,4 +120,179 @@ describe("Breadcrumbs", () => {
|
|
|
100
120
|
cy.mount(breadcrumbsShowItemsHigher);
|
|
101
121
|
cy.get("#breadcrumbs-show-items-higher").shadow().find(".udex-breadcrumbs__item--visible").should("have.length", 9);
|
|
102
122
|
});
|
|
123
|
+
|
|
124
|
+
describe("aria-expanded on dropdown trigger", () => {
|
|
125
|
+
// Updated: aria-expanded is now written by _setCustomAttributes() onto the inner <a>
|
|
126
|
+
// inside the udex-link shadow DOM, not on the udex-link host element itself.
|
|
127
|
+
it("has aria-expanded='false' on the trigger when the dropdown is closed", () => {
|
|
128
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger")
|
|
129
|
+
.shadow().find("a")
|
|
130
|
+
.should("have.attr", "aria-expanded", "false");
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it("has aria-expanded='true' on the trigger when the dropdown is open", () => {
|
|
134
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
135
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger")
|
|
136
|
+
.shadow().find("a")
|
|
137
|
+
.should("have.attr", "aria-expanded", "true");
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it("resets aria-expanded to 'false' after closing the dropdown with Escape", () => {
|
|
141
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
142
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger")
|
|
143
|
+
.shadow().find("a")
|
|
144
|
+
.should("have.attr", "aria-expanded", "true");
|
|
145
|
+
cy.get("body").realType("{esc}");
|
|
146
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger")
|
|
147
|
+
.shadow().find("a")
|
|
148
|
+
.should("have.attr", "aria-expanded", "false");
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// Updated: dropdown list changed from <ul> to <ol>; selectors updated accordingly
|
|
153
|
+
describe("dropdown <ol>/<li> structure", () => {
|
|
154
|
+
beforeEach(() => {
|
|
155
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it("wraps dropdown items in an <ol> inside the nav", () => {
|
|
159
|
+
cy.get("#breadcrumbs").shadow()
|
|
160
|
+
.find(".udex-breadcrumbs__popover-content ol")
|
|
161
|
+
.should("exist");
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it("wraps each focusable dropdown link in a <li> element", () => {
|
|
165
|
+
// Exclude the current-page <li aria-hidden="true"> which holds a <span>, not a link.
|
|
166
|
+
cy.get("#breadcrumbs").shadow()
|
|
167
|
+
.find(".udex-breadcrumbs__popover-content ol > li:not([aria-hidden])")
|
|
168
|
+
.each($li => {
|
|
169
|
+
cy.wrap($li).find("[udex-link]").should("exist");
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("wraps the current-page dropdown entry in a <li> with aria-hidden='true'", () => {
|
|
174
|
+
cy.get("#breadcrumbs").shadow()
|
|
175
|
+
.find("li[aria-hidden='true']")
|
|
176
|
+
.find(".udex-breadcrumbs__item--current")
|
|
177
|
+
.should("exist");
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
describe("aria-current='page' on dropdown current page item", () => {
|
|
182
|
+
it("marks the current page span inside the dropdown with aria-current='page'", () => {
|
|
183
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
184
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__item--current")
|
|
185
|
+
.should("have.attr", "aria-current", "page");
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it("renders the current page entry inside the dropdown as a span, not a link", () => {
|
|
189
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
190
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__item--current")
|
|
191
|
+
.should("not.have.attr", "udex-link");
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// Added: position-aware accessible names on dropdown links (posLabel feature)
|
|
196
|
+
describe("position-aware accessible names on dropdown links", () => {
|
|
197
|
+
beforeEach(() => {
|
|
198
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__trigger").click();
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it("sets aria-label on the first focusable dropdown link ending with ', 1 of 9'", () => {
|
|
202
|
+
cy.get("#breadcrumbs").shadow()
|
|
203
|
+
.find("[udex-link].udex-breadcrumbs__item--hidden").first()
|
|
204
|
+
.shadow().find("a")
|
|
205
|
+
.should("have.attr", "aria-label")
|
|
206
|
+
.and("match", /, 1 of 9$/);
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it("sets aria-label on the second focusable dropdown link ending with ', 2 of 9'", () => {
|
|
210
|
+
cy.get("#breadcrumbs").shadow()
|
|
211
|
+
.find("[udex-link].udex-breadcrumbs__item--hidden").eq(1)
|
|
212
|
+
.shadow().find("a")
|
|
213
|
+
.should("have.attr", "aria-label")
|
|
214
|
+
.and("match", /, 2 of 9$/);
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it("includes the item's own accessible name at the start of the aria-label for the first link", () => {
|
|
218
|
+
// Item 1 has accessible-name="Home page", so posLabel = "Home page, 1 of 9"
|
|
219
|
+
cy.get("#breadcrumbs").shadow()
|
|
220
|
+
.find("[udex-link].udex-breadcrumbs__item--hidden").first()
|
|
221
|
+
.shadow().find("a")
|
|
222
|
+
.should("have.attr", "aria-label", "Home page, 1 of 9");
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it("uses textContent as the label prefix when accessible-name is not set", () => {
|
|
226
|
+
// Item 2 has no accessible-name; textContent is "Second Level", so posLabel = "Second Level, 2 of 9"
|
|
227
|
+
cy.get("#breadcrumbs").shadow()
|
|
228
|
+
.find("[udex-link].udex-breadcrumbs__item--hidden").eq(1)
|
|
229
|
+
.shadow().find("a")
|
|
230
|
+
.should("have.attr", "aria-label", "Second Level, 2 of 9");
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("does not set aria-label on the current-page span in the dropdown", () => {
|
|
234
|
+
cy.get("#breadcrumbs").shadow()
|
|
235
|
+
.find(".udex-breadcrumbs__item--current")
|
|
236
|
+
.should("not.have.attr", "aria-label");
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
describe("showCurrentPage property", () => {
|
|
241
|
+
it("does not render the current page item in the main path by default", () => {
|
|
242
|
+
cy.get("#breadcrumbs").shadow().find(".udex-breadcrumbs__item--current-page")
|
|
243
|
+
.should("not.exist");
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
// Regression: when showCurrentPage is false the current-page <li> must not be rendered
|
|
247
|
+
// at all, so screen readers announce the correct list item count
|
|
248
|
+
it("does not render a <li> for the current page item when showCurrentPage is false", () => {
|
|
249
|
+
cy.mount(breadcrumbsHideCurrentPage);
|
|
250
|
+
// 4 items total (3 links + 1 current page), show-items="10" so no overflow.
|
|
251
|
+
// Fix skips the current-page entry → main nav ol should have 1 trigger + 3 link = 4 <li>s
|
|
252
|
+
cy.get("#breadcrumbs-hide-current-page").shadow().find("nav.ui5-breadcrumbs-root > ol > li")
|
|
253
|
+
.should("have.length", 4);
|
|
254
|
+
cy.get("#breadcrumbs-hide-current-page").shadow().find(".udex-breadcrumbs__item--current-page")
|
|
255
|
+
.should("not.exist");
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it("renders the current page item in the main path when showCurrentPage is true", () => {
|
|
259
|
+
cy.mount(breadcrumbsShowCurrentPage);
|
|
260
|
+
cy.get("#breadcrumbs-show-current-page").shadow().find(".udex-breadcrumbs__item--current-page")
|
|
261
|
+
.should("exist")
|
|
262
|
+
.and("be.visible");
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
it("reflects the show-current-page attribute on the host element", () => {
|
|
266
|
+
cy.mount(breadcrumbsShowCurrentPage);
|
|
267
|
+
cy.get("#breadcrumbs-show-current-page")
|
|
268
|
+
.should("have.attr", "show-current-page");
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
it("renders the current page item in the main path as a span, not a link", () => {
|
|
272
|
+
cy.mount(breadcrumbsShowCurrentPage);
|
|
273
|
+
cy.get("#breadcrumbs-show-current-page").shadow().find(".udex-breadcrumbs__item--current-page")
|
|
274
|
+
.should("match", "span")
|
|
275
|
+
.and("not.have.attr", "udex-link");
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
it("sets aria-current='page' on the current page span in the main path", () => {
|
|
279
|
+
cy.mount(breadcrumbsShowCurrentPage);
|
|
280
|
+
cy.get("#breadcrumbs-show-current-page").shadow().find(".udex-breadcrumbs__item--current-page")
|
|
281
|
+
.should("have.attr", "aria-current", "page");
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
it("sets role='presentation' on the current-page <li> so it is excluded from the list count", () => {
|
|
285
|
+
cy.mount(breadcrumbsShowCurrentPage);
|
|
286
|
+
cy.get("#breadcrumbs-show-current-page").shadow()
|
|
287
|
+
.find(".udex-breadcrumbs__item--current-page")
|
|
288
|
+
.parent("li")
|
|
289
|
+
.should("have.attr", "role", "presentation");
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
it("displays the correct text for the current page span in the main path", () => {
|
|
293
|
+
cy.mount(breadcrumbsShowCurrentPage);
|
|
294
|
+
cy.get("#breadcrumbs-show-current-page").shadow().find(".udex-breadcrumbs__item--current-page")
|
|
295
|
+
.should("contain.text", "Current Page");
|
|
296
|
+
});
|
|
297
|
+
});
|
|
103
298
|
});
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import {UDExFilterMenu, UDExFilterMenuItem, UDExFilterMenuGroupHeader, UDExFilterMenuSelectAll} from "../support/component-imports.js";
|
|
2
2
|
import {UDExListMode} from "../../src/types/List.js";
|
|
3
3
|
|
|
4
|
+
const filterMenuWithRating = <UDExFilterMenu
|
|
5
|
+
id="filter-menu-rating"
|
|
6
|
+
filter-name="Rating"
|
|
7
|
+
show-search-input="true"
|
|
8
|
+
mode={UDExListMode.MultiSelect}>
|
|
9
|
+
<UDExFilterMenuItem rating="5" ratingCount="5.0" totalCount="23"></UDExFilterMenuItem>
|
|
10
|
+
<UDExFilterMenuItem rating="4" ratingCount="4.0" totalCount="17"></UDExFilterMenuItem>
|
|
11
|
+
<UDExFilterMenuItem rating="3" ratingCount="3.0" totalCount="34"></UDExFilterMenuItem>
|
|
12
|
+
<UDExFilterMenuItem rating="2" ratingCount="2.0" totalCount="40"></UDExFilterMenuItem>
|
|
13
|
+
<UDExFilterMenuItem rating="1" ratingCount="1.0" totalCount="73"></UDExFilterMenuItem>
|
|
14
|
+
</UDExFilterMenu>
|
|
15
|
+
|
|
4
16
|
const filterMenu = <>
|
|
5
17
|
<div id="resetClick"></div>
|
|
6
18
|
<div id="resultClick"></div>
|
|
@@ -911,4 +923,45 @@ describe("Filter Menu component", () => {
|
|
|
911
923
|
cy.get("#resultSelectAll").should("have.text", "ui5-select-all");
|
|
912
924
|
});
|
|
913
925
|
});
|
|
926
|
+
|
|
927
|
+
describe("Filter Menu Rating Indicator", () => {
|
|
928
|
+
it("renders rating indicator in dropdown items when rating is set", () => {
|
|
929
|
+
cy.mount(filterMenuWithRating);
|
|
930
|
+
cy.get("#filter-menu-rating").shadow().find(".udex-filter-menu__trigger").click();
|
|
931
|
+
|
|
932
|
+
cy.get("#filter-menu-rating").shadow().find("udex-list-item").eq(0).shadow()
|
|
933
|
+
.find("[udex-rating-indicator]")
|
|
934
|
+
.should("exist");
|
|
935
|
+
});
|
|
936
|
+
|
|
937
|
+
it("passes correct rating attributes to dropdown list items", () => {
|
|
938
|
+
cy.mount(filterMenuWithRating);
|
|
939
|
+
cy.get("#filter-menu-rating").shadow().find(".udex-filter-menu__trigger").click();
|
|
940
|
+
|
|
941
|
+
cy.get("#filter-menu-rating").shadow().find("udex-list-item").eq(0)
|
|
942
|
+
.should("have.attr", "rating", "5")
|
|
943
|
+
.and("have.attr", "rating-count", "5.0")
|
|
944
|
+
.and("have.attr", "total-count", "23");
|
|
945
|
+
});
|
|
946
|
+
|
|
947
|
+
it("renders correct number of rating items", () => {
|
|
948
|
+
cy.mount(filterMenuWithRating);
|
|
949
|
+
cy.get("#filter-menu-rating").shadow().find(".udex-filter-menu__trigger").click();
|
|
950
|
+
|
|
951
|
+
cy.get("#filter-menu-rating").shadow().find("udex-list-item")
|
|
952
|
+
.should("have.length", 5);
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
it("selects a rating item on click", () => {
|
|
956
|
+
cy.mount(filterMenuWithRating);
|
|
957
|
+
cy.get("#filter-menu-rating").shadow().find(".udex-filter-menu__trigger").click();
|
|
958
|
+
|
|
959
|
+
cy.get("#filter-menu-rating").shadow().find("udex-list-item").eq(0).shadow()
|
|
960
|
+
.find(".udex-list__item").click();
|
|
961
|
+
|
|
962
|
+
cy.get("#filter-menu-rating").shadow().find("udex-list-item").eq(0).shadow()
|
|
963
|
+
.find(".udex-list__item")
|
|
964
|
+
.should("have.attr", "data-selected", "true");
|
|
965
|
+
});
|
|
966
|
+
});
|
|
914
967
|
});
|
|
@@ -4,6 +4,7 @@ import { UDExAvatarShape } from "../../dist/Avatar.js";
|
|
|
4
4
|
import { UDExAvatarSize } from "../../src/Avatar.js";
|
|
5
5
|
import { UDExAdditionalTextState, UDExListStyleType } from "../../src/types/List.js";
|
|
6
6
|
import UDExStatusBadgeValueState from "../../dist/types/StatusBadgeValueState.js";
|
|
7
|
+
import { UDExDisplayType } from "../../src/RatingIndicator.js";
|
|
7
8
|
|
|
8
9
|
const defaultListItem = <UDExListItem
|
|
9
10
|
id="listItem"
|
|
@@ -73,6 +74,13 @@ const listItemWithIcons = <UDExListItem
|
|
|
73
74
|
<UDExButton accessible-name='Action' slot='secondIcon' design='Tertiary' icon='decline' size='Small'></UDExButton>
|
|
74
75
|
</UDExListItem>
|
|
75
76
|
|
|
77
|
+
const listItemWithRating = <UDExListItem
|
|
78
|
+
id="listItemRating"
|
|
79
|
+
rating="4"
|
|
80
|
+
ratingCount="4.0"
|
|
81
|
+
totalCount="20">
|
|
82
|
+
</UDExListItem>
|
|
83
|
+
|
|
76
84
|
describe("ListItem", () => {
|
|
77
85
|
describe("Default rendering", () => {
|
|
78
86
|
it("should render the component", () => {
|
|
@@ -169,4 +177,44 @@ describe("ListItem", () => {
|
|
|
169
177
|
cy.get("#listItemWarning").shadow().find(".udex-list__add-text").should("have.css", "color", "rgb(141, 42, 0)");
|
|
170
178
|
});
|
|
171
179
|
});
|
|
180
|
+
|
|
181
|
+
describe("RatingIndicator", () => {
|
|
182
|
+
beforeEach(() => {
|
|
183
|
+
cy.mount(listItemWithRating);
|
|
184
|
+
cy.get("#listItemRating").shadow().find("[udex-rating-indicator]").as("rating");
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
it("renders rating indicator when rating is set", () => {
|
|
188
|
+
cy.get("@rating").should("exist");
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it("passes correct value to rating indicator", () => {
|
|
192
|
+
cy.get("@rating").should("have.attr", "value", "4");
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
it("passes correct rating-count to rating indicator", () => {
|
|
196
|
+
cy.get("@rating").should("have.attr", "rating-count", "4.0");
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
it("passes correct total-count to rating indicator", () => {
|
|
200
|
+
cy.get("@rating").should("have.attr", "total-count", "20");
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
it("sets max to 5 by default", () => {
|
|
204
|
+
cy.get("@rating").should("have.attr", "max", "5");
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it("sets display to Desktop by default", () => {
|
|
208
|
+
cy.get("@rating").should("have.attr", "display", UDExDisplayType.Desktop);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
it("sets disabled and readonly states by default", () => {
|
|
212
|
+
cy.get("@rating").should("have.attr", "disabled");
|
|
213
|
+
cy.get("@rating").should("have.attr", "readonly");
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it("sets correct aria-label on rating indicator", () => {
|
|
217
|
+
cy.get("@rating").should("have.attr", "aria-label", "Rating 4.0, Total 20, Rating Indicator 4 of 5");
|
|
218
|
+
});
|
|
219
|
+
});
|
|
172
220
|
});
|