Apologies if this has been asked before or if I'm missing something really obvious.
I'm currently locally running a Dockerized Symfony app, with a node container running the dev-server command. Now, while this runs great when developing, I've been running into an issue when trying to implement E2E tests using Panther, where the test browser (running in the php container) cannot access assets.
My understanding of the issue is that the entrypoints.json file points to the correct URL when developing (localhost:8080) but since the test browser is running in the php container, the correct URL would be node:8080 or host.docker.internal:8080.
I've tried to change this manually in entrypoints.json as a test, and it does work, but my real browser can in turn no longer access the dev-server assets.
My question is now: How do I achieve this without having to launch a command before running my tests again? I'm aware I could use watch mode instead, but I'd like to keep the benefits of using dev-server and be able to run my tests from my IDE without having to worry about what command my node container is currently running. I suppose I could also build my assets before running tests, but this slows down the process a considerable amount.
Hello,
Apologies if this has been asked before or if I'm missing something really obvious.
I'm currently locally running a Dockerized Symfony app, with a
node
container running the dev-server command. Now, while this runs great when developing, I've been running into an issue when trying to implement E2E tests using Panther, where the test browser (running in thephp
container) cannot access assets.My understanding of the issue is that the
entrypoints.json
file points to the correct URL when developing (localhost:8080
) but since the test browser is running in thephp
container, the correct URL would benode:8080
orhost.docker.internal:8080
.I've tried to change this manually in
entrypoints.json
as a test, and it does work, but my real browser can in turn no longer access the dev-server assets.My question is now: How do I achieve this without having to launch a command before running my tests again? I'm aware I could use watch mode instead, but I'd like to keep the benefits of using dev-server and be able to run my tests from my IDE without having to worry about what command my
node
container is currently running. I suppose I could also build my assets before running tests, but this slows down the process a considerable amount.My node container command:
Options I've thought of so far:
dev
andpanther
)Would greatly appreciate any help or ideas on this.
Cheers.