@@ -136,7 +136,7 @@ describe(`Select (Native Search)`, () => {
136136 ) ;
137137
138138 test (
139- 'selects the match with dropdown closed -- extended option with missing properties, searches entire option' ,
139+ 'selects the match with dropdown closed -- extended option with missing properties, searches entire option - "ano" ' ,
140140 setupTest ( optionsType , async page => {
141141 await page . focusSelect ( ) ;
142142 await page . keys ( [ 'a' , 'n' , 'o' ] ) ;
@@ -154,12 +154,28 @@ describe(`Select (Native Search)`, () => {
154154 ) ;
155155
156156 test (
157- 'selects the match with dropdown closed -- extended option with missing properties, searches entire option' ,
157+ 'selects the match with dropdown closed -- extended option with missing properties, searches entire option - "third" ' ,
158158 setupTest ( optionsType , async page => {
159159 await page . focusSelect ( ) ;
160160 await page . keys ( [ 't' , 'h' , 'i' , 'r' , 'd' ] ) ;
161161 await expect ( page . getTriggerLabel ( ) ) . resolves . toMatch ( 'Third thing' ) ;
162162 } )
163163 ) ;
164164 } ) ;
165+
166+ describe ( 'Options - Read-only' , ( ) => {
167+ test ( 'cannot use native search on read-only select' , async ( ) => {
168+ await setupTest ( 'simple' , async page => {
169+ await page . focusSelect ( ) ;
170+ await page . keys ( [ 'o' ] ) ;
171+ await expect ( page . getTriggerLabel ( ) ) . resolves . toBe ( 'Option 1' ) ;
172+ } ) ( ) ;
173+
174+ await setupTest ( 'readonly' , async page => {
175+ await page . focusSelect ( ) ;
176+ await page . keys ( [ 'o' ] ) ;
177+ await expect ( page . getTriggerLabel ( ) ) . resolves . toBe ( 'Choose option' ) ;
178+ } ) ( ) ;
179+ } ) ;
180+ } ) ;
165181} ) ;
0 commit comments