Test fails when baseUrl in cypress.json in not included
- Dominant language
- TypeScript
- Stars
- 210
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
I use config files to switch between environment URL's. I have multiple URL's I need to initiate with as well on my different test suites. Hence, I am not using a specific `baseUrl`. However, if `baseUrl` is not present in `cypress.json`, my tests fail. I had to include this variable with an actual value (e.g. https://loginsite.com) but will never use it.
I understand it is not best practice, but switching between environments would require me with one environment 'http' and another having 'https' and multiple other reasons. Example:
> "baseUrls":
> {
> "protocol": "https://",
> "domain": "test.com",
> "subDomain": "login"
> }

This is just a minor issue but I would like a cleaner code and not include parameters/variables that are not being used.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with a Cypress configuration that omits baseUrl, then compare it with the reported cypress.json setup and the project’s environment-specific config files. Confirm that tests can switch between the described HTTP and HTTPS URLs without requiring an unused baseUrl; the issue is done when the failing configuration runs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100