File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
src/core/plugins/oas3/components
test/e2e-cypress/tests/bugs Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,12 @@ export default class Servers extends React.Component {
104104 return (
105105 < div className = "servers" >
106106 < label htmlFor = "servers" >
107- < select onChange = { this . onServerChange } >
107+ < select onChange = { this . onServerChange } value = { currentServer } >
108108 { servers . valueSeq ( ) . map (
109109 ( server ) =>
110110 < option
111111 value = { server . get ( "url" ) }
112- key = { server . get ( "url" ) }
113- selected = { currentServer === server . get ( "url" ) } >
112+ key = { server . get ( "url" ) } >
114113 { server . get ( "url" ) }
115114 { server . get ( "description" ) && ` - ${ server . get ( "description" ) } ` }
116115 </ option >
Original file line number Diff line number Diff line change 33describe ( "#6351: Server dropdown should change when switched via oas3Actions.setSelectedServer" , ( ) => {
44 it ( "should show different selected server" , ( ) => {
55 cy . visit ( "/?url=/documents/bugs/6351.yaml" )
6- . get ( "select" )
7- . contains ( "http://testserver1.com" )
6+ . get ( "select" ) . should ( "have.value" , "http://testserver1.com" )
87 . window ( )
98 . then ( win => win . ui . oas3Actions . setSelectedServer ( "http://testserver2.com" ) )
10- . get ( "select" )
11- . contains ( "http://testserver2.com" )
9+ . get ( "select" ) . should ( "have.value" , "http://testserver2.com" )
1210 } )
1311} )
You can’t perform that action at this time.
0 commit comments