Skip to content

Automerge #56

@abtris

Description

@abtris
const { chromium } = require('playwright')
async function run () {
	const browser = await chromium.launch()
	const page = await browser.newPage()

	// We visit the page. This waits for the 'load' event by default.
  const response = await page.goto(process.env.DEPLOY_URL)

	// If the page doesn't return a successful response code, we fail the check.
	if (response.status() > 399) {
		throw new Error(`Failed with response code ${response.status()}`)
	}

	// We snap a screenshot.
	await page.screenshot({ path: 'deploy-screenshot.jpg', fullPage: true })

	// We close the page to clean up and gather performance metrics.
	await page.close()
	await browser.close()
}

run()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions