Uh oh!
There was an error while loading. Please reload this page.
test: Use yarn ocap for e2e tests - #268
Conversation
eb712d8 to
d19a668Compareb40a7d6 to
ed546baCompareed546ba to
5371e83Compare| "test:verbose": "yarn test --reporter verbose", | ||
| "test:watch": "vitest --config vitest.config.ts", | ||
| "test:e2e": "playwright test", | ||
| "test:e2e": "yarn start:server & playwright test", |
There was a problem hiding this comment.
But does the server close when the tests end? Was there an issue with playwrights webServer option?
There was a problem hiding this comment.
yes, the issue was playwright not noticing ocap serve is up when using the webServer command and just hanging waiting for it to start listening. I tried to notify of listening by sending 200 on empty / ping request but without success; so it seems to me playwright is not querying the server to find out if it's up but just waiting for the launch process to exit. the issue is the start:server command never returns control to playwright, and I would need to write a background process w/ disk state to do so. instead I opted to just run in a different shell process and auto hangup
There was a problem hiding this comment.
#226 asks about a daemon the cli can start / stop; given some time to implement a daemon, a stateful server would be an easy add-on. Then I could make the ocap serve command exit once the server is up instead of holding open while the server is running. In the mean time... 'not ideal' beats 'not implemented' 🙃
Refactors the e2e test invocation to avoid a timed hangup of the server. We still start the server in parallel with Playwright, but we always close the server by killing its process after the tests end.
Uh oh!
There was an error while loading. Please reload this page.
Changes
@ocap/extensiontest-e2e-ci.shshell script.ocap bundleandocap serveto setup the e2e tests.