Skip to content

Remove bundled browsers dependency #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions lambdatest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,7 @@ exports.test = base.test.extend({
let fileName = testInfo.file.split(path.sep).pop()
if (testInfo.project.name.match(/lambdatest/)) {
modifyCapabilities(testInfo.project.name, `${testInfo.title} - ${fileName}`)

const browser = await chromium.connect({
wsEndpoint: `wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`
})

const ltPage = await browser.newPage(testInfo.project.use)
await use(ltPage)

const testStatus = {
action: 'setTestStatus',
arguments: {
status: testInfo.status,
remark: getErrorMessage(testInfo, ['error', 'message'])
}
}
await ltPage.evaluate(() => {},
`lambdatest_action: ${JSON.stringify(testStatus)}`)
await ltPage.close()
await browser.close()
} else {
// Run tests in local in case of local config provided
await use(page)
}
}
})
})
1 change: 1 addition & 0 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const config = {
{
name: 'chrome:latest@lambdatest',
use: {
connectOptions: {"wsEndpoint": "wss://cdp.lambdatest.com/playwright?capabilities=%7B%22browserName%22%3A%22chrome%22%2C%22browserVersion%22%3A%22latest%22%2C%22LT%3AOptions%22%3A%7B%22platform%22%3A%22linux%22%2C%22build%22%3A%22Playwright%20HyperExecute%20Build%22%2C%22name%22%3A%22Navigate%20PlayWright%20Documentation%20-%20test_3.spec.js%22%2C%22user%22%3A%22onpremezztt%22%2C%22accessKey%22%3A%22<REPLACE_YOUR_ACCESS_KEY>%22video%22%3Atrue%2C%22console%22%3Atrue%7D%7D"},
viewport: { width: 1280, height: 720 }
}
}
Expand Down
4 changes: 3 additions & 1 deletion yaml/linux/.hyperexecute_autosplits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ maxRetries: 1
concurrency: 2
pre:
- npm install
- npx playwright install
cacheKey: '{{ checksum "package-lock.json" }}'
cacheDirectories:
- node_modules
Expand All @@ -20,4 +19,7 @@ testDiscovery:
command: grep -nri 'describe' tests | sed 's/:test.*//'
testRunnerCommand: npx playwright test $test

env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

jobLabel: [playwright-VanillaJS, linux, autosplit]