@@ -65,7 +65,6 @@ describe("Carousel general interaction", () => {
65
65
assert . strictEqual ( pageIndicatorDot1 . getAttribute ( "aria-label" ) , PAGE_INDICATOR_ARIA_LABEL1 , "The aria-label of page indicator is correct." ) ;
66
66
assert . strictEqual ( pageIndicatorDot2 . getAttribute ( "aria-label" ) , PAGE_INDICATOR_ARIA_LABEL2 , "The aria-label of page indicator is correct." ) ;
67
67
68
-
69
68
const carouselItem3 = carousel . shadow$ ( ".ui5-carousel-item:nth-child(3)" ) ;
70
69
const carouselItem4 = carousel . shadow$ ( ".ui5-carousel-item:nth-child(4)" ) ;
71
70
const CAROUSEL_ITEM3_POS = "3" ;
@@ -90,13 +89,29 @@ describe("Carousel general interaction", () => {
90
89
assert . strictEqual ( carouselRoot . getAttribute ( "aria-activedescendant" ) , ACTIVEDESCENDANT_PAGE_2 , "The aria-activedescendant of carousel is correct." ) ;
91
90
} ) ;
92
91
92
+ it ( "all visible elements in the current page have correct tabindex values" , ( ) => {
93
+ const carousel = browser . $ ( "#carouselCards" ) ;
94
+
95
+ const visibleItems = [
96
+ carousel . shadow$ ( ".ui5-carousel-item:nth-child(1) slot" ) ,
97
+ carousel . shadow$ ( ".ui5-carousel-item:nth-child(2) slot" ) ,
98
+ carousel . shadow$ ( ".ui5-carousel-item:nth-child(3) slot" ) ,
99
+ ] ;
100
+
101
+ assert . strictEqual (
102
+ visibleItems . every ( el => el . getAttribute ( "tabindex" ) === "0" ) ,
103
+ true ,
104
+ "all visible items have correct tabindex values"
105
+ ) ;
106
+ } ) ;
107
+
93
108
it ( "Arrows and Dots not displayed in case of single page" , ( ) => {
94
109
const carousel = browser . $ ( "#carousel6" ) ;
95
110
const pages = carousel . getProperty ( "pagesCount" ) ;
96
111
const pageIndicator = carousel . shadow$ ( ".ui5-carousel-navigation-wrapper" ) ;
97
112
const navigationArrows = carousel . shadow$ ( ".ui5-carousel-navigation-arrows" ) ;
98
113
99
- assert . ok ( ! pageIndicator . isExisting ( ) , "Page indicator is not srendered " ) ;
114
+ assert . ok ( ! pageIndicator . isExisting ( ) , "Page indicator is not rendered " ) ;
100
115
assert . ok ( ! navigationArrows . isExisting ( ) , "Navigation arrows are not rendered" ) ;
101
116
assert . strictEqual ( pages , 1 , "There is only 1 page." ) ;
102
117
} ) ;
@@ -149,7 +164,7 @@ describe("Carousel general interaction", () => {
149
164
assert . strictEqual ( eventCounter . getProperty ( "value" ) , "6" , "The navigate event is not fired as no previous item." ) ;
150
165
} ) ;
151
166
152
- it ( "loadMore event is thrown only when neccessary" , ( ) => {
167
+ it ( "loadMore event is fired only when neccessary" , ( ) => {
153
168
const carousel = browser . $ ( "#carousel9" ) ;
154
169
const eventCounter = browser . $ ( "#loadmore-result" ) ;
155
170
const navigationArrowForward = carousel . shadow$ ( "ui5-button[arrow-forward]" ) ;
@@ -161,12 +176,12 @@ describe("Carousel general interaction", () => {
161
176
navigationArrowForward . click ( ) ;
162
177
navigationArrowForward . click ( ) ;
163
178
164
- assert . strictEqual ( eventCounter . getProperty ( "value" ) , "0" , "loadMore event is not thrown " ) ;
179
+ assert . strictEqual ( eventCounter . getProperty ( "value" ) , "0" , "loadMore event is not fired " ) ;
165
180
166
181
navigationArrowForward . click ( ) ;
167
182
navigationArrowForward . click ( ) ;
168
183
navigationArrowForward . click ( ) ;
169
184
170
- assert . strictEqual ( eventCounter . getProperty ( "value" ) , "3" , "loadMore event is thrown 3 times" ) ;
185
+ assert . strictEqual ( eventCounter . getProperty ( "value" ) , "3" , "loadMore event is fired 3 times" ) ;
171
186
} ) ;
172
187
} ) ;
0 commit comments