aboutsummaryrefslogtreecommitdiffstats
path: root/prototypes/workbench/results/2026-09-23-web-layout/value-control.log
blob: 346a5a699a24198f6d4aabdcee6e97dff5b21460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
### Result
{"checks":["numeric control dispatches change and publishes the authored result","numeric controls do not create a held pointer owner","the same authored clamp handles negative requests"]}
### Ran Playwright code
```js
await (async page => {
  const checks=[],check=(ok,label)=>{if(!ok)throw new Error(label);checks.push(label);};
  await page.waitForFunction(()=>window.pureWorkbench?.snapshot().ready);
  await page.locator('#source').fill('state amount=0\ninput level=value\ntext label(20,40,amount)\non level.change {amount=clamp(event_value,0,100)}');
  await page.locator('#apply').click();
  await page.getByLabel('level',{exact:true}).fill('123');await page.getByRole('button',{name:'값 전달',exact:true}).click();
  let s=await page.evaluate(()=>window.pureWorkbench.snapshot());check(s.states.amount===100&&s.lastEvent.phase==='change','numeric control dispatches change and publishes the authored result');
  check(s.held.length===0,'numeric controls do not create a held pointer owner');
  await page.getByLabel('level',{exact:true}).fill('-5');await page.getByRole('button',{name:'값 전달',exact:true}).click();
  s=await page.evaluate(()=>window.pureWorkbench.snapshot());check(s.states.amount===0,'the same authored clamp handles negative requests');
  await page.evaluate(e=>window.__pureValueEvidence=e,{checks});return{checks};
}
)(page);
```