fill method infrastructure ✓ 100.0%
Last updated: 2026-03-04T23:21:38.387Z
Metrics
LOC: 12
Complexity: 5
Params: 2
Coverage: 100.0% (5/5 lines, 7x executed)
Signature
fill(wrapper: HTMLElement, value: string): : boolean
Source Code
fill(wrapper: HTMLElement, value: string): boolean {
const isChecked = wrapper.classList.contains("ant-switch-checked");
const shouldBeOn =
value === "true" || value === "1" || value === "on" || value === "yes";
// Toggle only if current state doesn't match desired state
if (shouldBeOn !== isChecked) {
simulateClick(wrapper);
}
return true;
},
Dependencies (Outgoing)
| Target | Type |
|---|---|
| simulateClick | calls |
No incoming dependencies.