Skip to content

Commit

Permalink
Merge 41493fa into 6d814a5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 16, 2023
2 parents 6d814a5 + 41493fa commit 6142419
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/screenshot/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use strict'

const { getBrowser } = require('@browserless/test/util')
const cheerio = require('cheerio')
const test = require('ava')

const browser = getBrowser()

test('graphics features', async t => {
const browserless = await browser.createContext()

t.teardown(browserless.destroyContext)

const page = await browserless.page()
await page.goto('chrome://gpu/')

const html = await page.evaluate(() => document.querySelector('info-view').shadowRoot.innerHTML)
await page.close()

const $ = cheerio.load(html)

const props = []

$('.feature-status-list li').each(function () {
props.push($(this).text().split(': '))
})

const gpu = Object.fromEntries(props)
t.is(gpu.WebGL, 'Software only, hardware acceleration unavailable')
t.is(gpu.WebGL2, 'Software only, hardware acceleration unavailable')
})

0 comments on commit 6142419

Please sign in to comment.