* Creates a Percy build with only a blank page for comparison. * * Enables us to require percy checks on GitHub, and yet, not have to do a full * build for every PR. * * @param {!puppeteer.Browser} browser a Puppeteer controlled browser. * @return {Promise }
(browser)
| 573 | * @return {Promise<void>} |
| 574 | */ |
| 575 | async function createEmptyBuild(browser) { |
| 576 | log('info', 'Generating the blank page snapshot'); |
| 577 | |
| 578 | const page = await newPage(browser); |
| 579 | |
| 580 | try { |
| 581 | await page.goto( |
| 582 | `http://${HOST}:${PORT}/examples/visual-tests/blank-page/blank.html` |
| 583 | ); |
| 584 | } catch { |
| 585 | // Ignore failures |
| 586 | } |
| 587 | |
| 588 | // @ts-ignore Type mismatch in library |
| 589 | await percySnapshot(page, 'Blank page', SNAPSHOT_SINGLE_BUILD_OPTIONS); |
| 590 | } |
| 591 | |
| 592 | /** |
| 593 | * Runs the AMP visual diff tests. |
no test coverage detected