fix a couple flaky tests (#5061)

* fix: forgot to increase maxDiffPixels for one snapshot test, making it more chance to flake. let's see if this work

* hopefully fix PerformanceIndicator test flakes

* hopefully actually fix PerfIndicator test this time

* ok, *finally* fix PerfIndicator test... hopefully...

* simplify PerfIndicator test to check only for positive fps value
This commit is contained in:
Joe Pea
2022-04-20 10:41:09 -07:00
committed by GitHub
parent 54d1b8991c
commit a5580912e3
4 changed files with 15 additions and 25 deletions

View File

@ -47,7 +47,7 @@ test.use({
});
test.describe('ExportAsJSON', () => {
test.only('autoscale off causes no error from undefined user range', async ({ page }) => {
test('autoscale off causes no error from undefined user range', async ({ page }) => {
await page.goto('/', { waitUntil: 'networkidle' });
await setTimeRange(page);
@ -102,7 +102,7 @@ test.describe('ExportAsJSON', () => {
testYTicks(page, ['0.00', '0.50', '1.00', '1.50', '2.00']),
new Promise(r => setTimeout(r, 100))
.then(() => canvas.screenshot())
.then(shot => expect(shot).toMatchSnapshot('autoscale-canvas-panned.png', { maxDiffPixels: 20 }))
.then(shot => expect(shot).toMatchSnapshot('autoscale-canvas-panned.png', { maxDiffPixels: 40 }))
]);
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 30 KiB