LearnNewsExamplesServices
Frontmatter
id7283
titleConvert functional/HtmlTemplateComponent.mjs Test from Siesta to Playwright
stateClosed
labels
enhancementhelp wantedgood first issuehacktoberfest
assigneeserbierc
createdAtSep 27, 2025, 3:55 PM
updatedAtOct 10, 2025, 4:30 PM
githubUrlhttps://github.com/neomjs/neo/issues/7283
authortobiu
commentsCount12
parentIssue7262
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 8, 2025, 7:55 PM

Convert functional/HtmlTemplateComponent.mjs Test from Siesta to Playwright

Closed v11.0.0 enhancementhelp wantedgood first issuehacktoberfest
tobiu
tobiu commented on Sep 27, 2025, 3:55 PM

This task is to migrate the unit test for functional/HtmlTemplateComponent.mjs from the Siesta test harness to the Playwright test runner.

Acceptance Criteria

  1. Create a new test file at test/playwright/unit/functional/HtmlTemplateComponent.spec.mjs.
  2. Translate all assertions from the original file (test/siesta/tests/functional/HtmlTemplateComponent.mjs) to the Playwright/Jest expect syntax.
  3. Ensure the new test runs successfully via npm test.
  4. The new test must cover all the functionality of the original Siesta test.
tobiu added the enhancement label on Sep 27, 2025, 3:55 PM
tobiu added parent issue #7262 on Sep 27, 2025, 3:55 PM
tobiu added the help wanted label on Oct 2, 2025, 9:24 PM
tobiu added the good first issue label on Oct 2, 2025, 9:24 PM
tobiu added the hacktoberfest label on Oct 2, 2025, 9:24 PM
erbierc
erbierc Oct 3, 2025, 1:43 PM

I'd like to contribute :)

tobiu
tobiu Oct 3, 2025, 6:17 PM

Hi and thanks for your interest. For the testing tickets, I strongly recommend trying out the “ai native” workflow.

I would read the hacktoberfest intro first: https://github.com/neomjs/neo/issues/7296

Then the following 2 guides: https://github.com/neomjs/neo/blob/dev/.github/WORKING_WITH_AGENTS.md https://github.com/neomjs/neo/blob/dev/.github/AI_QUICK_START.md

E.g. gemini cli should be capable to complete it on its own.

tobiu assigned to @erbierc on Oct 3, 2025, 6:17 PM
erbierc
erbierc Oct 8, 2025, 2:16 PM

I have mostly completed this task, the only thing left is to check if the Gemini output is correct - the tests are passing.

tobiu
tobiu Oct 8, 2025, 2:24 PM

Thx for the heads-up, and feel free to send the PR => i will let gemini double-check it anyway. How was your experience with the ai workflow? still work in progress, and it should become a lot better, once the MCP-server epic is finished.

erbierc
erbierc Oct 8, 2025, 2:34 PM

I actually had a problem (managed to finish the task anyway), where when I wanted to use chroma related scripts, I'd get an error: "Unsupported Windows architecture: x64. Only ARM64 is supported". I got around it using WSL but without full functionality, that's why I kinda wanted to try one more time before sending a PR, using a virtual machine with Linux on it and making sure I got the full experience!

tobiu
tobiu Oct 8, 2025, 2:37 PM

interesting. i think the MCP servers (express => node) as wrappers around chroma will resolve it => https://github.com/neomjs/neo/issues/7399 . if there are specific operations you want to use on chroma, which are not part of the API specs, feel free to create a follow-up ticket for the new epic.

erbierc
erbierc Oct 8, 2025, 7:06 PM

I have created a PR: #7420

erbierc cross-referenced by PR #7420 on Oct 8, 2025, 7:07 PM
tobiu referenced in commit bf777ce - "#7283 minor cleanup" on Oct 8, 2025, 7:51 PM
tobiu
tobiu Oct 8, 2025, 7:55 PM

Input from Gemini:

✦ Hi @erbierc ,

Thanks again for your excellent work on PR #7420! We've successfully merged it.

As a quick follow-up and learning opportunity, we've just pushed a couple of small polish items to the test file you created. You can see the changes in this commit: https://github.com/neomjs/neo/commit/bf777ce1b31882a70b7bf845abae07254ef8bd34

What we changed:

  1. We replaced the manual Neo.config setup with a call to our centralized setup() helper function.
  2. We added an "intent-driven" JSDoc comment block at the top of the test suite.

Why we changed it:

  1. Your manual setup was perfectly correct. However, for the new Playwright test suite, we have a shared helper (test/playwright/setup.mjs) to reduce code duplication and make the test suite easier to maintain.
  2. The JSDoc block with a @summary is a convention we use for all new tests. It helps developers (and our AI agents) quickly understand the purpose of a test suite without having to read the full implementation.

These are common patterns you'll see in larger projects, and we wanted to share them with you as part of the contribution process.

Thanks again for the fantastic contribution

tobiu closed this issue on Oct 8, 2025, 7:55 PM
erbierc
erbierc Oct 8, 2025, 8:10 PM

Lovely, thank you!

tobiu
tobiu Oct 8, 2025, 8:23 PM

Can you imagine that I created all Siesta tests manually? This was pre-AI :)

We are getting very close to complete this epic. Afterwards, we can remove the Siesta based unit tests completely. However, there are many files which don't have any testing yet. This would be worth a Gemini exploration, and new tickets.

There is a second side of the coin: component based testing. I already tried it out for performance-benchmarking here: https://github.com/neomjs/benchmarks

The numbers favor neo a lot. We can adopt these patterns and use playwright to use different browsers. AI can then still inspect the results, since the harness is nodejs based.

This would definitely be worth a new epic.

Currently, I can barely keep up with the progress: the last release v10.9 was 2 weeks ago, and now we have 150+ new tickets inside: https://github.com/neomjs/neo/tree/dev/.github/ISSUE

erbierc
erbierc Oct 10, 2025, 2:21 PM

Tell you what, I am looking to add proper test writing to my skillset, so I could try and help out in that regard! It might take some time, though, as I would need to analyze neo better and learn playwright properly.

I think it would also be neat to add Svelte to the comparison, it is quite strong in performance, as far as I'm aware.

150 tickets is a crazy number!

tobiu
tobiu Oct 10, 2025, 4:30 PM

For testing, playwright is definitely gaining momentum in the industry, and as far as i know has now more adoption than cypress. I would also recommend to take a look into Vitest. Sadly this one does not really fit for neo, since Vite is designed to start a server for one app, while neo needs split-chunks across multiple apps (e.g. app folder inside the neo repo & workspaces). More details: https://github.com/neomjs/neo/blob/dev/learn/benefits/FourEnvironments.md.

Svelte is interesting, since it addresses the "bloated" vdom approach of e.g. React. There are definitely use cases for optimising the performance inside the main thread (closely coupling JSX to DOM elements directly).

However, limiting frontends to a main thread is exactly what neo challenges. The design goal is to run most parts of the framework and your apps in either a dedicated or a shared application web worker. Since workers have no access to the live-DOM, we need a super lightweight vdom abstraction as a cross-thread messaging protocol. This also enables multi-window apps.

I just updated the project vision & roadmap, to better describe the big picture: https://github.com/neomjs/neo/blob/dev/ROADMAP.md https://github.com/neomjs/neo/blob/dev/.github/VISION.md