agreeable-lunch-15323
04/28/2023, 9:07 AMts
cy.vist('http://localhost:4200')
and the worst part:
I cannot connect to http://localhost:4200 on a seperate tab in the browser instance that is running cypress.
for an example.
if I choose chrome as the browser, the test will not run, I will get the error
ts
CypressError
cy.visit() failed trying to load:
http://localhost:4200/login
We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:
> Error: connect ECONNREFUSED 127.0.0.1:4200
and if on the same browser instance I create a new tab and go to http://localhost:4200, I do not get a response. same thing when I create a new window from that instance.
But if I just open another browser instance that is not created by or from the instance running cypress, I can connect to local host and get the appropriate responses.
Here is a link[https://drive.google.com/file/d/1exDHylkA8283rw2EUmHKEsczLsENzEm4/view?usp=sharing] of a video showing the issue.
I used different browsers to test and same result.agreeable-lunch-15323
04/28/2023, 9:37 AMagreeable-lunch-15323
04/28/2023, 9:43 AM[::1]:4200/login on the browser instance running cypress and it connects.
but cypress is now picking the absolute path of my project folder and appending the ip address at the end:
sh
cy.visit() failed trying to load:
http:://[::1]:4200/login
We failed looking for this file at the path:
/Users/username/path/to/project/root:/[::1]:4200/loginmany-airline-45402
04/28/2023, 9:46 AMagreeable-lunch-15323
04/28/2023, 9:48 AMagreeable-lunch-15323
04/28/2023, 9:55 AMagreeable-lunch-15323
04/28/2023, 9:55 AMmany-airline-45402
04/28/2023, 9:57 AMagreeable-lunch-15323
04/28/2023, 9:58 AMagreeable-lunch-15323
04/28/2023, 9:58 AMagreeable-lunch-15323
04/28/2023, 10:16 AMmany-airline-45402
04/28/2023, 10:32 AMmany-airline-45402
04/28/2023, 10:35 AMagreeable-lunch-15323
04/28/2023, 2:09 PMmany-airline-45402
04/28/2023, 2:37 PMagreeable-lunch-15323
05/01/2023, 6:38 AMmany-airline-45402
05/01/2023, 6:47 AM