@@ -88,9 +88,37 @@ describe('Meilisearch features', () => {
8888 cy . get ( 'input[name="host"]' ) . should ( 'have.value' , host )
8989 cy . get ( 'input[name="apiKey"]' ) . should ( 'have.value' , apiKey )
9090 } )
91+
92+ it . only ( 'displays error when setting empty host' , ( ) => {
93+ visitPluginPage ( )
94+ cy . get ( 'button:contains("Settings")' ) . click ( )
95+
96+ cy . get ( 'input[name="host"]' ) . clear ( )
97+ cy . contains ( 'button' , 'Save' ) . click ( )
98+
99+ cy . removeNotifications ( )
100+ cy . get ( 'input[name="host"]' ) . should ( 'have.value' , '' )
101+
102+ visitPluginPage ( )
103+ const row = `table[role='grid'] tbody tr:nth-child(1) button[role="checkbox"]`
104+
105+ cy . get ( row ) . click ( )
106+ cy . contains ( 'The provided host is not valid.' ) . should ( 'be.visible' )
107+ cy . removeNotifications ( )
108+
109+ cy . get ( row ) . should ( 'not.be.checked' )
110+
111+ visitPluginPage ( )
112+ cy . get ( 'button:contains("Settings")' ) . click ( )
113+ cy . get ( 'input[name="host"]' ) . should ( 'have.value' , '' )
114+ cy . get ( 'input[name="host"]' ) . clear ( )
115+ cy . get ( 'input[name="host"]' ) . type ( host )
116+ cy . contains ( 'button' , 'Save' ) . click ( )
117+ cy . removeNotifications ( )
118+ } )
91119 } )
92120
93- describe . only ( 'Collections panel' , ( ) => {
121+ describe ( 'Collections panel' , ( ) => {
94122 it ( 'displays all collections' , ( ) => {
95123 visitPluginPage ( )
96124
0 commit comments