Files
DndGamePlayer/app/renderer/shared/ui/controls.tooltip.test.ts
T
Ivan Fontosh cfa3959fb3 feat(scenes): rich scene descriptions and control viewer window
Add TipTap editing in the editor and an Electron window on the control panel to read the current scene description.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 09:49:40 +08:00

17 lines
723 B
TypeScript

import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import test from 'node:test';
import { fileURLToPath } from 'node:url';
const here = path.dirname(fileURLToPath(import.meta.url));
void test('Button: тултип через портал (title), не только нативный атрибут', () => {
const src = fs.readFileSync(path.join(here, 'controls.tsx'), 'utf8');
assert.ok(src.includes('createPortal'));
assert.ok(src.includes('role="tooltip"'));
assert.ok(src.includes('onMouseEnter={showTip}'));
assert.ok(src.includes('document.body'));
assert.ok(src.includes('disabledTipHost'), 'disabled + title → хост для hover-тултипа');
});