chore(memory): V1-2.2 interior rule evidence, tools, LRN-105..107
This commit is contained in:
1 parent
c73415abef
commit
e190dfc794
8 files changed
+233
No files matched your search
@@ -0,0 +1,20 @@
|
||||
chromium-320 caudal: 21 geometric hits, taps {"caudal":18,"-":3}
|
||||
chromium-320 sacral: 67 geometric hits, taps {"sacral":51,"l6-s1":11,"-":2,"sacroiliac":2,"hip":1}
|
||||
chromium-320 lumbar: 104 geometric hits, taps {"lumbar":87,"t18-l1":9,"l6-s1":8}
|
||||
chromium-320 thoracic: 97 geometric hits, taps {"-":1,"thoracic":72,"c7-t1":18,"t18-l1":6}
|
||||
chromium-320 cervical: 195 geometric hits, taps {"cervical":195}
|
||||
chromium-320 head-trigger: 284 geometric hits, taps {"head-trigger":278,"-":6}
|
||||
chromium-375 caudal: 30 geometric hits, taps {"caudal":30}
|
||||
chromium-375 sacral: 97 geometric hits, taps {"sacral":77,"-":3,"l6-s1":15,"sacroiliac":2}
|
||||
chromium-375 lumbar: 144 geometric hits, taps {"lumbar":120,"t18-l1":13,"l6-s1":11}
|
||||
chromium-375 thoracic: 141 geometric hits, taps {"thoracic":121,"c7-t1":13,"t18-l1":7}
|
||||
chromium-375 cervical: 275 geometric hits, taps {"cervical":269,"-":6}
|
||||
chromium-375 head-trigger: 403 geometric hits, taps {"head-trigger":399,"-":4}
|
||||
webkit-375 caudal: 30 geometric hits, taps {"caudal":29,"-":1}
|
||||
webkit-375 sacral: 97 geometric hits, taps {"l6-s1":4,"-":2,"sacral":91}
|
||||
webkit-375 lumbar: 144 geometric hits, taps {"lumbar":142,"t18-l1":1,"-":1}
|
||||
webkit-375 thoracic: 141 geometric hits, taps {"-":10,"thoracic":130,"c7-t1":1}
|
||||
webkit-375 cervical: 275 geometric hits, taps {"cervical":270,"-":5}
|
||||
webkit-375 head-trigger: 403 geometric hits, taps {"-":7,"head-trigger":396}
|
||||
|
||||
[exited with code 0]
|
||||
@@ -0,0 +1,38 @@
|
||||
import { test } from '../support/browser'
|
||||
test('probe zone taps', async ({ page }, info) => {
|
||||
test.setTimeout(1_800_000)
|
||||
await page.goto('/e2e/harness/canvas.html')
|
||||
await page.locator('[data-anno-id="caudal"]').waitFor({ state: 'attached' })
|
||||
const zones = ['caudal', 'sacral', 'lumbar', 'thoracic', 'cervical', 'head-trigger']
|
||||
const out: string[] = []
|
||||
for (const id of zones) {
|
||||
const pts = await page.evaluate((id) => {
|
||||
const svg = document.querySelector('[data-testid="anatomy-canvas"] svg') as SVGSVGElement
|
||||
const ctm = svg.getScreenCTM()!
|
||||
const z = svg.querySelector(`[data-anno-id="${id}"]`) as SVGGeometryElement
|
||||
const b = z.getBBox()
|
||||
const step = 2 / ctm.a
|
||||
const res: { x: number; y: number; hit: string }[] = []
|
||||
for (let x = b.x; x <= b.x + b.width; x += step) for (let y = b.y; y <= b.y + b.height; y += step) {
|
||||
if (!z.isPointInFill(new DOMPoint(x, y))) continue
|
||||
const p = new DOMPoint(x, y).matrixTransform(ctm)
|
||||
const hit = document.elementFromPoint(p.x, p.y)?.closest('[data-anno-id]')?.getAttribute('data-anno-id') ?? '-'
|
||||
res.push({ x: p.x, y: p.y, hit })
|
||||
}
|
||||
return res
|
||||
}, id)
|
||||
const tally: Record<string, number> = {}
|
||||
let n = 0
|
||||
for (const p of pts) {
|
||||
if (p.hit !== id) continue
|
||||
n++
|
||||
const before = ((await page.getByTestId('clicks').textContent()) ?? '').split(' ').filter(Boolean).length
|
||||
await page.touchscreen.tap(p.x, p.y)
|
||||
await page.waitForTimeout(400)
|
||||
const got = ((await page.getByTestId('clicks').textContent()) ?? '').split(' ').filter(Boolean).slice(before).join(',') || '-'
|
||||
tally[got] = (tally[got] ?? 0) + 1
|
||||
}
|
||||
out.push(`${info.project.name} ${id}: ${n} geometric hits, taps ${JSON.stringify(tally)}`)
|
||||
}
|
||||
console.log(out.join('\n'))
|
||||
})
|
||||
Reference in new issue
Block a user