fix: contract checks of D7 and B9: a small vertical floating video, the whole art in Minha conta, and the home card's play and pause in the browser test
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Failing after 7m50s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Has been skipped
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Failing after 7m50s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Has been skipped
Found checking D7/B9 in the browser: the vertical floating player could reach 70% of the screen over the buy box (now 150 px wide, at most 44vh); the saved sheet's picture was cropped. The browser test now checks that a home card plays when on screen and pauses off it (its Chrome decodes no video, so it records the play and pause the page asks for). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,6 +128,21 @@ try{
|
||||
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);
|
||||
// A home card plays muted and in loop only while it is on screen (Rodada 5,
|
||||
// D7). Chrome here decodes no video, so the test records what the page asks
|
||||
// of the card's player: play when it enters the screen, pause when it leaves.
|
||||
await evaluate(`(()=>{window.cardCalls=[];const P=HTMLMediaElement.prototype;
|
||||
window.realPlay=P.play;window.realPause=P.pause;
|
||||
P.play=function(){if(this.closest('.videoCard'))cardCalls.push('play');return Promise.resolve();};
|
||||
P.pause=function(){if(this.closest('.videoCard'))cardCalls.push('pause');};
|
||||
VIDEOS[0].src='/preview.mp4';videosSection();})()`);
|
||||
assert.deepEqual(await evaluate(`(()=>{const v=document.querySelector('#videosGrid .videoCard video');return {muted:v.muted,loop:v.loop,inline:v.playsInline};})()`),
|
||||
{muted:true,loop:true,inline:true});
|
||||
await evaluate(`window.scrollTo({top:document.querySelector('#videosGrid .videoCard').getBoundingClientRect().top+scrollY-200,behavior:'instant'})`);
|
||||
await waitFor(()=>evaluate(`cardCalls.at(-1)==='play'`),'home video card plays on screen');
|
||||
await evaluate(`window.scrollTo({top:0,behavior:'instant'})`);
|
||||
await waitFor(()=>evaluate(`cardCalls.at(-1)==='pause'`),'home video card pauses off screen');
|
||||
await evaluate(`HTMLMediaElement.prototype.play=realPlay;HTMLMediaElement.prototype.pause=realPause`);
|
||||
await evaluate(`VIDEOS[0].src=null;videosSection()`);
|
||||
// Observe the actual engine, without replacing its placement or rendering.
|
||||
await evaluate(`(()=>{
|
||||
|
||||
Reference in New Issue
Block a user