ActionCable not connecting during capybara-webkit spec function

I have a problem using actioncable with function specifications using Capybara-webkit. Actioncable works fine on my development server, but when testing javascript can not seem to connect.

This is the result of the javascript console, which works during function specification

WebSocket connection to 'ws://127.0.0.1:32789/cable' failed: Unexpected response code: 200

This is the result of mine test.logat that moment

GET     "/cable"  for 127.0.0.1  at 2017-01-26 13:33:23 +0000
GET     "/cable/"  for 127.0.0.1  at 2017-01-26 13:33:23 +0000
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)

This is strange because it seems to be fined according to the log, but javascript throws an error and stops executing ... Just like an 200error code? Does the status code mean 200 OK?

Thanks in advance

+4
1

, Capybara, : webrick, ActionCable ( , Capybara 3.0). puma, ActionCable, Capybara.server = :puma Capybara.

+8

Source: https://habr.com/ru/post/1667885/


All Articles