feat(Board): add always-editable RoleField specimen input

This commit is contained in:
Ilia Mashkov
2026-06-24 15:27:20 +03:00
parent 738ed3b4ed
commit 59097ca9ad
4 changed files with 274 additions and 0 deletions
+13
View File
@@ -19,6 +19,19 @@ Element.prototype.animate = vi.fn().mockReturnValue({
// jsdom lacks SVG geometry methods
(SVGElement.prototype as any).getTotalLength = vi.fn(() => 0);
// jsdom lacks innerText; back it with textContent so contenteditable specs work.
if (!Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerText')) {
Object.defineProperty(HTMLElement.prototype, 'innerText', {
configurable: true,
get(this: HTMLElement) {
return this.textContent ?? '';
},
set(this: HTMLElement, value: string) {
this.textContent = value;
},
});
}
// Robust localStorage mock for jsdom environment
const localStorageMock = (() => {
let store: Record<string, string> = {};