mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-07 11:46:42 +03:00
test: gardening (#11235)
This commit is contained in:
parent
eaf2507ec1
commit
f0269e7144
@ -169,7 +169,7 @@ for (const statusCode of [200, 401, 404, 500]) {
|
||||
}
|
||||
|
||||
it('should have correct responseBodySize for 404 with content', async ({ page, server, browserName }) => {
|
||||
it.fail(browserName === 'chromium');
|
||||
it.fixme(browserName === 'chromium');
|
||||
|
||||
server.setRoute('/broken-image.png', (req, resp) => {
|
||||
resp.writeHead(404);
|
||||
|
@ -321,32 +321,4 @@ it.describe('page screenshot', () => {
|
||||
screenshotSeveralTimes()
|
||||
]);
|
||||
});
|
||||
|
||||
it('should work for text on canvas', async ({ page, headless, browserName, platform }) => {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/11177' });
|
||||
it.skip(platform !== 'darwin', 'Only test mac for font consistency');
|
||||
it.fixme(browserName === 'chromium' && !headless, 'Text is misaligned in headed vs headless Chromium');
|
||||
|
||||
await page.setContent(`
|
||||
<canvas></canvas>
|
||||
<script>
|
||||
function draw() {
|
||||
const canvas = document.querySelector('canvas');
|
||||
canvas.width = 300;
|
||||
canvas.height = 150;
|
||||
canvas.style.width = '300px';
|
||||
canvas.style.height = '150px';
|
||||
|
||||
const context = canvas.getContext('2d');
|
||||
context.font = 'bold 15px sans-serif';
|
||||
context.fillStyle = '#000000';
|
||||
context.textBaseline = 'middle';
|
||||
|
||||
context.fillText('LOREM IPSUM', 10, 50);
|
||||
}
|
||||
</script>`);
|
||||
await page.evaluate('draw()');
|
||||
const screenshot = await page.screenshot();
|
||||
expect(screenshot).toMatchSnapshot('screenshot-canvas-text.png', { threshold: 0 });
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user