Add isolated file-upload form variants for DLP E2E testing
还没有人认领这个 Issue。
评估
调研方向
Start at the advanced-fields page and inspect the consuming apps/webext-e2e activity/file-upload DLP specs and their page-object selectors. Add isolated, stable file-upload form fixtures for the requested submit and destination cases, with a harmless same-origin endpoint, then verify the E2E specs can target them without serializing the existing catch-all form.
由索引模型根据 Issue 内容生成。
描述
Context
The PixieBrix browser-extension file-upload DLP enforcer (activity Phase 5) gates uploads at the <form> submit vector and resolves the upload destination from the form's action — so apps/webext-e2e needs a faithful multipart form to drive it.
Today the advanced-fields page only has a file input nested inside the big catch-all <form class="input">, which has no action, no enctype, and no method. That's enough for the metadata-block-at-change test, but not for faithful submit/destination testing:
- The destination resolves to the page URL only (can't exercise destination-scoped rules).
- Submitting the shared catch-all form drags in every other field and does a real GET navigation.
A temporary E2E is landing against the catch-all form (using a synthetic submit event to avoid navigation), but we'd like a dedicated, isolated fixture to switch to.
Request
Add one or more isolated file-upload forms to the advanced-fields page (separate from <form class="input">), each with stable selectors (ids / aria-labels) and vendor-neutral example domains. Prioritized:
Must-have
- Basic single-file multipart POST form —
<form action="/dlp-upload" method="post" enctype="multipart/form-data">with a labeled<input type="file">+ a submit<button>. A same-originaction(a route that just returns204) so an allowed upload doesn't error the page (tests will also route-intercept it).
Nice-to-have (each exercises a specific enforcer branch)
- Cross-origin
action— same form butaction=\"https://uploads.example.com/files\", to test destination-scopedurlPatternrules (the enforcer judges origin + path). -
formactionoverride — a form with oneactionplus a submit<button formaction=\"https://uploads.example.com/other\">; the enforcer prefers the submitter'sformactionas the destination. -
form=-associated input outside the form —<input type=\"file\" form=\"<form-id>\">living outside the<form>subtree; the enforcer readsform.elementsto catch these. - Multiple-file input —
<input type=\"file\" multiple>for multi-file uploads. - Drag-and-drop dropzone — a labeled dropzone that accepts dropped files, for the
drop/pasteinterception vectors (a later follow-up).
Constraints
- Keep each form isolated from the existing catch-all
<form class="input">so submitting it doesn't serialize unrelated fields. - Stable, documented selectors (ids or
aria-labels) — the E2E page object targets these. - Use neutral
example.comdomains for cross-origin actions. - The endpoint(s) can be a trivial
204(Vercel serverless or a static handler) — no real storage needed.
Consumed by the pixiebrix-source apps/webext-e2e activity/file-upload DLP specs.
- 主要语言
- HTML
- 星标
- 3
- 派生
- 1
- 平均合并
- 46 分钟
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pixiebrix/playground 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 25/100
pixiebrix/playground#62 · 1 条评论 ·
查看 pixiebrix/playground 的全部 Issue
相似的 Issue
-
refactor
难度 2/5 1-3 小时 新手友好度 84/100
-
bug follow-up-work-in-progress from-review-extraction llm-providers python severity:should-fix
难度 2/5 1-3 小时 新手友好度 88/100
-
type/automation type/tech-debt
难度 2/5 1-3 小时 新手友好度 84/100
-
bug core
难度 2/5 1-3 小时 新手友好度 86/100
-
[Duplicate Code] Share the Cloud Hypervisor network-plan fixture between launch and config tests 未关闭code-quality refactoring
难度 2/5 1-3 小时 新手友好度 88/100
github/gh-aw-firewall#8974 ·