eeschema copy/paste fix: wx UTF-8 text dataobj (c1f1477) + regression specs
Cmd+C/Cmd+V in the wasm eeschema pasted a stray "(" SCH_TEXT — the stroke
font renders it as a small blue arc — instead of the copied symbol, and any
copy reached navigator.clipboard as a single character. Root cause and fix
live in wxwidgets (90bbad29822: UTF-8 wxDF_UNICODETEXT + the port's missing
GetAllFormats key function; c1f14775ba3: empty-read cache fallback + no
browser pre-clear on copy). This bump carries them plus the guards:
- tests/kicad/eeschema-copy-paste.spec.ts: chromium asserts the full
multi-form (lib_symbols …)(symbol …) blob reaches navigator.clipboard;
both engines assert copy → paste → save yields a second symbol and no
stray (text …) item (firefox exercises the m_textCache fallback path).
The kicad-chromium project now grants clipboard-read/write. NB the kicad
projects' device UAs claim Windows, so specs must send plain Control+…
— ControlOrMeta resolves to Meta on a mac host, which the "Windows" app
ignores, and the bare key fires eeschema hotkeys instead.
- tests/e2e/textdataobj.spec.ts + Makefile.wasm target `textdataobj`:
drives the wx-repo harness app (wxwidgets/tests/wasm/textdataobj_test.cpp)
and asserts the SUITE-DONE failure counters plus the full-string browser
round-trip, sentinel-seeded so a failed write cannot read as stale success.
- tests/e2e/clipboard.spec.ts: the Copy test now asserts the full input
text reaches the clipboard (previously truncated to "S").
Verified locally: all specs red on the old wx, green after; wx-chromium
320/320, kicad-chromium 121/121 (collab specs env-gated).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
fcad12d251
commit
6034a0550d
6 changed files with 324 additions and 2 deletions
|
|
@ -22,6 +22,9 @@ test.describe('wxClipboard Tests', () => {
|
|||
await page.goto('/standalone/clipboard/clipboard_test.html');
|
||||
await waitForWxApp(page);
|
||||
|
||||
// Seed the clipboard so a silently-failed write cannot pass as success.
|
||||
await page.evaluate(() => navigator.clipboard.writeText('SENTINEL-BEFORE-COPY'));
|
||||
|
||||
// Click "Copy to Clipboard" button
|
||||
await clickByLabel(page, 'Copy to Clipboard');
|
||||
|
||||
|
|
@ -30,6 +33,11 @@ test.describe('wxClipboard Tests', () => {
|
|||
(l.includes('SUCCESS') && l.includes('Copied')) || l.includes('Attempting to copy')
|
||||
), { message: 'Copy should succeed or at least attempt' }).toBe(true);
|
||||
|
||||
// The FULL input text must reach the browser clipboard — the UTF-32/UTF-8
|
||||
// mixup in wxTextDataObject used to truncate it to its first character.
|
||||
const clip = await page.evaluate(() => navigator.clipboard.readText());
|
||||
expect(clip).toBe('Sample text for clipboard test');
|
||||
|
||||
await stableShot(page, 'clipboard-02-copy-clicked.png', { fullPage: true });
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue