test: gardening (#11235)

This commit is contained in:
Pavel Feldman 2022-01-07 09:11:54 -08:00 committed by GitHub
parent eaf2507ec1
commit f0269e7144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 29 deletions

View File

@ -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);

View File

@ -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 });
});
});