Skip to content

Instantly share code, notes, and snippets.

@corradin
Created May 13, 2022 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corradin/16c1a62ea60bf99fca71d60c9228fbd7 to your computer and use it in GitHub Desktop.
Save corradin/16c1a62ea60bf99fca71d60c9228fbd7 to your computer and use it in GitHub Desktop.
import { test, expect } from '@playwright/test';
test('example test', async ({ page }) => {
await page.goto('http://localhost:3000');
await page.waitForLoadState('networkidle');
await expect(page).toHaveScreenshot({
maxDiffPixelRatio: 0.02,
mask: [page.locator('data-test-id=random-game-image')],
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment