Objective
What to automate
Attempt to upload an SVG with a script and verify safe rejection.
Preconditions and test data
Preconditions
- Use a fresh isolated Practice Lab browser context.
- Open the fixture identified by FX-FILE-001.
Test data
filename: unsafe.svgcontent: <svg><script>alert(1)</script></svg>
Expected result
The API rejects the file, reports the allowlist/content rule, and creates no download token.
Progressive hints
Hint 1
Build the file payload in memory.
Hint 2
Assert the error code rather than browser wording alone.
Hint 3
Verify no accepted file row or token appears.
I’ve tried it — show solution
- Build the file payload in memory.
- Assert the error code rather than browser wording alone.
- Verify no accepted file row or token appears.