fix: align proof, treatment, metrics and site videos with PDF
All checks were successful
Build and deploy / Validate source (push) Successful in 11s
Build and deploy / Integration suite on a real stack (push) Successful in 5m44s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m22s

This commit is contained in:
Cauê Faleiros
2026-11-06 15:27:48 -03:00
parent f4cd1842ca
commit a712c69aca
30 changed files with 631 additions and 110 deletions

View File

@@ -116,8 +116,19 @@ try{
await call('Emulation.setDeviceMetricsOverride',{width:1440,height:1100,deviceScaleFactor:1,mobile:false});
await call('Page.navigate',{url:`http://127.0.0.1:${server.address().port}/`});
await waitFor(()=>evaluate(`typeof sel==='function' && typeof pintaEntrega==='function'`),'Site scripts');
assert.equal(await evaluate(`document.querySelectorAll('#videosGrid .videoCard').length`),6);
assert.equal(await evaluate(`document.querySelector('#videosGrid').textContent.includes('Subindo a arte pelo celular')`),true);
await evaluate('window.siteVideosReady');
assert.equal(await evaluate(`document.querySelectorAll('#videosGrid .videoCard').length`),0);
assert.equal(await evaluate(`document.querySelector('#videos').hidden`),true);
await evaluate(`VIDEOS[0].src='/preview.mp4';videosSection()`);
await evaluate(`document.querySelector('#videosGrid .videoCard').focus()`);
await click('#videosGrid .videoCard');
assert.deepEqual(await evaluate(`({dialog:document.querySelector('.videoModal').getAttribute('role'),
focus:document.activeElement.className,open:!document.querySelector('.videoModal').hidden})`),
{dialog:'dialog',focus:'vmClose',open:true});
await call('Input.dispatchKeyEvent',{type:'keyDown',key:'Escape',code:'Escape',windowsVirtualKeyCode:27});
assert.equal(await evaluate(`document.querySelector('.videoModal').hidden &&
document.activeElement.classList.contains('videoCard')`),true);
await evaluate(`VIDEOS[0].src=null;videosSection()`);
// Observe the actual engine, without replacing its placement or rendering.
await evaluate(`(()=>{
const original=encaixar;
@@ -172,6 +183,19 @@ try{
return [(await medir(...linhas(2))).px,(await medir(...linhas(5))).px,(await medir(...linhas(6))).px,
(await medir(...linhas(20))).classe,(await medir(...linhas(20),...ciscos)).classe];})()`),[2,5,6,'C3','C3']);
await click('[data-modo="file"]');
// A ready sheet with two source files stores the finest stroke's position
// on the combined film, not its position within the second file.
assert.deepEqual(await evaluate(`(()=>{
const old=folhas,oldLayout=montagemLayout;
folhas=[{an:{traco:{px:9,classe:'C2',proofYFraction:0.2}}},
{an:{traco:{px:3,classe:'C1',proofYFraction:0.5}}}];
montagemLayout=null;
try{return tracoDoItem(null,{height_cm:100,placements:[
{source_index:0,y_cm:0,length_cm:50,rotation_degrees:0},
{source_index:1,y_cm:50,length_cm:50,rotation_degrees:0}]});}
finally{folhas=old;montagemLayout=oldLayout;}
})()`),{strokePx:3,strokeClass:'C1',strokeChoice:null,
proofSourceIndex:1,proofYFraction:0.75});
// Opening a product paints on the next frame; on a busy runner the check
// must wait for it rather than race it.
await waitFor(()=>evaluate(`!$('tipoEnvio').hidden`),'by-metre product open');