remove test
This commit is contained in:
parent
0a4c4f58cb
commit
2a2a95fd4d
|
|
@ -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>
|
|
||||||
|
|
@ -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.`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue