nightwatchjs / nightwatch-plugin-react

Nightwatch plugin which adds support for React component testing using the Vite dev server. Requires Nightwatch 2.3+
https://nightwatchjs.org
MIT License
6 stars 9 forks source link

launchURL should not be hardcoded to 'localhost' #7

Open tjad opened 1 year ago

tjad commented 1 year ago

The launch url is hardcoded to 'localhost'. I am wanting to do remote testing - via docker. This blocks me from being able to allow my test docker environment from using a custom url to the container hosting the vite server.

https://github.com/nightwatchjs/nightwatch-plugin-react/blob/41d0d1bd210e0e8dd06e27de94d6af66f5720047/nightwatch/globals.js#L62

ahmad-kashkoush commented 7 months ago

@garg3133 I can Solve this Issue by short circuiting the value assigned to to baseURL, and launchURL variables, may I Solve this Issue?

ahmad-kashkoush commented 7 months ago

@garg3133 that is my solution, I'm trying to not make big changes and make everything work as it is

// launchUrl2 is a parameter with empty string default value
  this.launchUrl = this.baseUrl = launchUrl2 ||`http://localhost:${vite_port}`;