feat(Board): add always-editable RoleField specimen input
This commit is contained in:
@@ -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> = {};
|
||||
|
||||
Reference in New Issue
Block a user