File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
packages/kit-headless/src Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -365,14 +365,19 @@ describe('Tabs', () => {
365
365
} ) ;
366
366
} ) ;
367
367
368
- it . only ( `GIVEN 3 tabs
369
- WHEN clicking the first one and triggering the right arrow key
370
- THEN render the middle panel` , ( ) => {
371
- cy . mount ( < ThreeTabsComponent /> ) ;
368
+ describe . skip ( 'Manual behavior' , ( ) => {
369
+ it ( `GIVEN 3 tabs
370
+ WHEN clicking the first one and triggering the right arrow key and then "enter"
371
+ THEN the middle panel should be selected` , ( ) => {
372
+ cy . mount ( < ThreeTabsComponent /> ) ;
372
373
373
- cy . findByRole ( 'tab' , { name : / T a b 1 / i } ) . click ( ) ;
374
+ cy . findByRole ( 'tab' , { name : / T a b 1 / i } )
375
+ . click ( )
376
+ . type ( '{rightarrow}' )
377
+ . type ( '{enter}' ) ;
374
378
375
- cy . findByRole ( 'tabpanel' ) . should ( 'contain' , 'Panel 2' ) ;
379
+ cy . findByRole ( 'tabpanel' ) . should ( 'contain' , 'Panel 2' ) ;
380
+ } ) ;
376
381
} ) ;
377
382
} ) ;
378
383
Original file line number Diff line number Diff line change @@ -159,6 +159,9 @@ export const Tabs = component$((props: TabsProps) => {
159
159
( tabPair ) => tabPair . tabId === currentTabId
160
160
) ;
161
161
162
+ if ( key === KeyCode . Enter ) {
163
+ }
164
+
162
165
if (
163
166
key === KeyCode . ArrowRight ||
164
167
( props . vertical && key === KeyCode . ArrowDown )
Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ export enum KeyCode {
7
7
End = 'End' ,
8
8
PageUp = 'PageUp' ,
9
9
PageDown = 'PageDown' ,
10
+ Enter = 'Enter' ,
10
11
}
You can’t perform that action at this time.
0 commit comments