mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
chore: drop obsolete scripts and a stale dev dependency, make knip report clean
- Nine one-off scripts from January and February that nothing references: three Ralph wizard drivers that click the start-screen button removed in 1.50 (against the production port, with a personal case name), a respawn monitor with a hardcoded session id, link-detection experiments for patterns that no longer exist, and two screenshot and data helpers. - @types/uuid: uuid 14 ships its own types and TypeScript already resolves them from the package. - config/knip.json now describes the workspace layout it runs in (its top-level entry and project keys were being ignored), names the manual scripts as entries, lists the system binaries tests shell out to, and honours @knipignore. `npm run knip` reports nothing; CLAUDE.md says so. - Two more unused tap helpers in the mobile test toolkit. - Docs that pointed at files which no longer exist: the browser testing guide (four deleted test files), the orchestrator panel's file name, two spawn modules in the Ralph guide, the respawn mock utilities. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
6fb8b27768
commit
03cb6a68b4
19 files changed
+29
-1050
No files matched your search
@@ -202,44 +202,3 @@ export async function swipe(
|
||||
await swipeViaSynthetic(page, direction, swipeOpts);
|
||||
}
|
||||
|
||||
/** Tap an element via CDP (trusted touch) */
|
||||
export async function tapViaCDP(page: Page, selector: string): Promise<void> {
|
||||
const cdp = await getCDP(page);
|
||||
const box = await page.locator(selector).boundingBox();
|
||||
if (!box) throw new Error(`Element ${selector} not found for tap`);
|
||||
|
||||
const x = box.x + box.width / 2;
|
||||
const y = box.y + box.height / 2;
|
||||
|
||||
await dispatchTouchEvent(cdp, 'touchStart', [{ x, y }]);
|
||||
await page.waitForTimeout(50);
|
||||
await dispatchTouchEvent(cdp, 'touchEnd', []);
|
||||
}
|
||||
|
||||
/** Tap an element via synthetic touch (cross-engine) */
|
||||
export async function tapViaSynthetic(page: Page, selector: string): Promise<void> {
|
||||
await page.evaluate((sel) => {
|
||||
const el = document.querySelector(sel);
|
||||
if (!el) return;
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + rect.width / 2;
|
||||
const y = rect.top + rect.height / 2;
|
||||
const touch = new Touch({
|
||||
identifier: 0,
|
||||
target: el,
|
||||
clientX: x,
|
||||
clientY: y,
|
||||
});
|
||||
el.dispatchEvent(new TouchEvent('touchstart', {
|
||||
touches: [touch],
|
||||
changedTouches: [touch],
|
||||
bubbles: true,
|
||||
}));
|
||||
el.dispatchEvent(new TouchEvent('touchend', {
|
||||
touches: [],
|
||||
changedTouches: [touch],
|
||||
bubbles: true,
|
||||
}));
|
||||
}, selector);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user