File tree 2 files changed +77
-0
lines changed
2 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,72 @@ exports[`TabList structure : default options 1`] = `
66
66
</div >
67
67
` ;
68
68
69
+ exports [` TabList structure : isVertical option 1` ] = `
70
+ <div >
71
+ <ul
72
+ className = " rc-dyn-tabs-tablist rc-dyn-tabs-ltr rc-dyn-tabs-vertical"
73
+ role = " tablist"
74
+ >
75
+ <li
76
+ aria-controls = " rc-dyn-tabs-p-1"
77
+ aria-expanded = { true }
78
+ aria-labelledby = " rc-dyn-tabs-l-1"
79
+ aria-selected = { true }
80
+ className = " rc-dyn-tabs-tab rc-dyn-tabs-selected"
81
+ onClick = { [Function ]}
82
+ role = " tab"
83
+ tab-id = " 1"
84
+ tabIndex = { 0 }
85
+ >
86
+ <button
87
+ className = " rc-dyn-tabs-title"
88
+ id = " rc-dyn-tabs-l-1"
89
+ role = " presentation"
90
+ tab-id = " 1"
91
+ tabIndex = { - 1 }
92
+ title = " "
93
+ >
94
+ tab1
95
+ </button >
96
+ <span
97
+ className = " rc-dyn-tabs-close"
98
+ role = " presentation"
99
+ >
100
+ ×
101
+ </span >
102
+ </li >
103
+ <li
104
+ aria-controls = " rc-dyn-tabs-p-2"
105
+ aria-expanded = { false }
106
+ aria-labelledby = " rc-dyn-tabs-l-2"
107
+ aria-selected = { false }
108
+ className = " rc-dyn-tabs-tab"
109
+ onClick = { [Function ]}
110
+ role = " tab"
111
+ tab-id = " 2"
112
+ tabIndex = { - 1 }
113
+ >
114
+ <button
115
+ className = " rc-dyn-tabs-title"
116
+ id = " rc-dyn-tabs-l-2"
117
+ role = " presentation"
118
+ tab-id = " 2"
119
+ tabIndex = { - 1 }
120
+ title = " "
121
+ >
122
+ tab2
123
+ </button >
124
+ <span
125
+ className = " rc-dyn-tabs-close"
126
+ role = " presentation"
127
+ >
128
+ ×
129
+ </span >
130
+ </li >
131
+ </ul >
132
+ </div >
133
+ ` ;
134
+
69
135
exports [` TabList structure : none accessibility option 1` ] = `
70
136
<div >
71
137
<ul
Original file line number Diff line number Diff line change @@ -67,4 +67,15 @@ describe('TabList structure : ', () => {
67
67
. toJSON ( ) ;
68
68
expect ( tree ) . toMatchSnapshot ( ) ;
69
69
} ) ;
70
+ test ( 'isVertical option' , ( ) => {
71
+ setMockUseContext ( { isVertical : true } ) ;
72
+ const tree = renderer
73
+ . create (
74
+ < div >
75
+ < TabList > </ TabList >
76
+ </ div > ,
77
+ )
78
+ . toJSON ( ) ;
79
+ expect ( tree ) . toMatchSnapshot ( ) ;
80
+ } ) ;
70
81
} ) ;
You can’t perform that action at this time.
0 commit comments