resolveActionType function ✓ 100.0%
Last updated: 2026-03-01T23:25:47.080Z
Metrics
LOC: 15
Complexity: 9
Params: 1
Coverage: 100.0% (8/8 lines, 13x executed)
Signature
resolveActionType(field: FormField): : ActionType
Source Code
function resolveActionType(field: FormField): ActionType {
const el = field.element;
if (el instanceof HTMLSelectElement) return "select";
if (el instanceof HTMLInputElement) {
if (el.type === "checkbox") return el.checked ? "check" : "uncheck";
if (el.type === "radio") return "radio";
if (el.type === "submit") return "submit";
}
if (el instanceof HTMLButtonElement && el.type === "submit") return "submit";
return "fill";
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| FormField | uses |
| GenerationResult | uses |
| ActionType | uses |
| CapturedAction | uses |
| extractSmartSelectors | uses |
Impact (Incoming)
| Source | Type |
|---|---|
| buildCapturedActions | calls |