sveltejs / sveltejs/kit

Flaky basics form submission test on GitHub Actions due to extra CSS chunk

Open
#14,693 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

The packages/kit/test/apps/basics Playwright suite intermittently fails on Routing › responds to <form method="GET"> submission without reload. When a CSS chunk (e.g. _app/immutable/assets/0.DylTJ_5d.css) is fetched during form submission, the test fails because it expects no additional network requests after the form submit.
This likely occurs due to route-level CSS code-splitting in SvelteKit. The small <style> in src/routes/+layout.svelte is extracted into a separate asset whenever a new route is added or moved, even if that route defines no styles.
It appears that the outcome depends on whether that CSS chunk was cached by a previous test run, causing the test to alternate between passing and failing.

Reproduction

No external reproduction required
reproducible in SvelteKit CI (GitHub Actions).

Logs

System Info
System:
  OS: Linux (GitHub Actions CI)
Severity

annoyance

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the packages/kit/test/apps/basics Playwright suite with Routing › responds to

submission without reload, then inspect src/routes/+layout.svelte and the route-level CSS behavior described in the issue. Reproduce the GitHub Actions failure and verify that the test remains stable without an unexpected CSS chunk request after form submission.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, playwright
Domain
testing-qa, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.