Conversation
|
off the bat without deep review, I recommend using nodejs24 (or later), nodejs20 will be deprecated soon afaict |
@hlolli do you think we are going to merge this? i was just archiving my progress so far. There is interest for this? Either way, updated node to newer version. uncovered question:
|
| let browser, page; | ||
|
|
||
| before(async () => { | ||
| browser = await launchBrowser(); |
There was a problem hiding this comment.
Consider a shared global setup that launches one browser once, for speed.
There was a problem hiding this comment.
I'm always in favor of speed. But, if you agree, i would like to avoid a one browser fit all. While opening and closing browser is an expensive task it cleans cache. I also don't like parallelism on test. If we should simulate real user, i don't expect them to have multiple live session running in the backgroud and 2 or 4 pages or even browser instance with web-ide opened doing different jobs.
I think that 1 browser per file (where file are a group of test) and on page context per test is a good compromise.
But i'm happy to rework if needed or if my vision is unrealistic.
| let browser, page; | ||
|
|
||
| before(async () => { | ||
| browser = await launchBrowser(); |
There was a problem hiding this comment.
Consider a shared global setup that launches one browser once, for speed.
There was a problem hiding this comment.
Same as editor. Another point is: what if we need a subset of all test, maybe we want to test mobile, or safari, or another browser launch with different args?
Otherwise, i'm ok with adding a pre-test step where we launch a global browser.
|
|
- Switch gotoProject from networkidle2 to domcontentloaded for local target — Vite's on-demand module transforms cause unpredictable network activity that can stall or race with the idle heuristic - Add preliminary #root children check in waitForEditor to surface React bootstrap failures early instead of a generic 60s timeout - Add debug helpers (screenshot, browser logs, page HTML) that dump on failure for CI visibility - Upload puppeteer-tests/screenshots/ as GitHub Actions artifact on test failure
…rebase mockup, added artifacts upload
I think we can only trigger action that are already on develop branch
Target url are stored on const TARGETS = {
local: {
baseUrl: "http://localhost:3000",
projectUrl: "http://localhost:3000/editor/ElPGLLOOc5qWNM4VmfVV"
},
dev: {
baseUrl: "https://csound-ide-dev.web.app",
projectUrl: "https://csound-ide-dev.web.app/editor/ElPGLLOOc5qWNM4VmfVV"
},
prod: {
baseUrl: "https://ide.csound.com",
projectUrl: "https://ide.csound.com/editor/oRl3K1TaYnICnAxv7bUg"
}
};there is a problem that when opening a develop url like https://csound-ide-dev.web.app/editor/ElPGLLOOc5qWNM4VmfVV i get nit: for the author of the project, if i'm using your test and you want the test to be removed i will do it asap. Thank you in advance and sorry if i did not sent an email. I was opening random project and looking at good candidates. |
|
@hlolli on failed test we upload artifacts (for now screnshoot, in the future maybe traces or similar, maybe a video recording of the sesion) https://github.com/csound/web-ide/actions/runs/24613771266/job/71972560249. Does this cost money? I'm not sure if github charges for storage. Safe to remove in that case. If this has no cost, than i would suggest to keep it. It helped me a lot during this debug session. |
Description
Introduce end-to-end tests using Puppeteer to enhance testing coverage for the application.
This includes configurations, test scripts, and utility functions to facilitate browser interactions and assertions.
The setup supports multiple environments and integrates with the existing CI/CD workflow.