## TL;DR

baseURL only applies to relative URLs, so any absolute URL in a test or fixture bypasses it. Find the absolute URLs, make them relative, and build fixture URLs from the config instead of hardcoding hosts.

## The query

```text
playwright baseURL ignored in some tests: how to fix
```

## Use this when

- some tests ignore baseURL
- tests pass locally but hit the wrong host in CI
- fixtures hardcode hosts

## Not for

- baseURL unset in the config
- multi-origin testing (use absolute URLs deliberately there)
- API base URLs

## Steps

1. Search the spec and its fixtures for 'http' to find absolute URLs. Expected output: a list of absolute URLs that bypass baseURL.
2. Convert page.goto calls to relative paths like page.goto('/dashboard'). Expected output: all navigations use relative paths.
3. Check fixtures and helpers that construct URLs; derive them from the baseURL config value instead of a hardcoded host. Expected output: no hardcoded hosts in fixtures.
4. Confirm the config's baseURL is set in the right project, since it can differ per project. Expected output: the active project shows the expected baseURL.
5. Re-run against a non-default baseURL to prove the tests follow the config. Expected output: tests hit the overridden host.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_lFI6dieLQRgB9pJsFplChA
