remove test

This commit is contained in:
Simon Knott 2024-11-14 09:13:57 +01:00
parent 0a4c4f58cb
commit 2a2a95fd4d
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 1 additions and 33 deletions

View file

@ -1,32 +0,0 @@
<style>
#overlay {
position: absolute;
top: 150px;
left: 150px;
width: 150px;
height: 150px;
background-color: red;
opacity: 0.7;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.container {
position: relative;
width: 500px;
height: 500px;
}
</style>
<div class="container">
<canvas id="myCanvas" width="500" height="500"></canvas>
<div id="overlay"><span>An HTML element</span></div>
</div>
<script>
const ctx = document.getElementById('myCanvas').getContext('2d');
ctx.fillStyle = 'blue';
ctx.fillRect(50, 50, 200, 200);
</script>

View file

@ -1510,7 +1510,7 @@ test('canvas clipping', async ({ runAndTrace, page, server }) => {
}); });
const msg = await traceViewer.page.waitForEvent('console', { predicate: msg => msg.text().startsWith('canvas drawn:') }); const msg = await traceViewer.page.waitForEvent('console', { predicate: msg => msg.text().startsWith('canvas drawn:') });
expect(msg.text()).toEqual('canvas drawn: [0,51,12,62]'); expect(msg.text()).toEqual('canvas drawn: [0,91,11,20]');
const snapshot = await traceViewer.snapshotFrame('page.goto'); const snapshot = await traceViewer.snapshotFrame('page.goto');
await expect(snapshot.locator('canvas')).toHaveAttribute('title', `Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`); await expect(snapshot.locator('canvas')).toHaveAttribute('title', `Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`);