Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add isolated file-upload form variants for DLP E2E testing

未关闭
#77 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
html
领域
testing, web-dev

调研方向

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-origin action (a route that just returns 204) 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 but action=\"https://uploads.example.com/files\", to test destination-scoped urlPattern rules (the enforcer judges origin + path).
  • formaction override — a form with one action plus a submit <button formaction=\"https://uploads.example.com/other\">; the enforcer prefers the submitter's formaction as the destination.
  • form=-associated input outside the form — <input type=\"file\" form=\"<form-id>\"> living outside the <form> subtree; the enforcer reads form.elements to 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/paste interception 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.com domains 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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pixiebrix/playground 的其他 Issue

查看 pixiebrix/playground 的全部 Issue

相似的 Issue

更多 Testing & QA Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。