devops: add chromium-headless-shell bots (#33242)
This commit is contained in:
parent
69f56b9f63
commit
487134fbaf
|
@ -284,3 +284,24 @@ jobs:
|
|||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PLAYWRIGHT_CHROMIUM_USE_HEADLESS_NEW: 1
|
||||
|
||||
test_linux_chromium_headless_shell:
|
||||
name: Chromium Headless Shell
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runs-on: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: chromium-headless-shell
|
||||
command: npm run ctest
|
||||
bot-name: "headless-shell-${{ matrix.runs-on }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: chromium-headless-shell
|
||||
|
|
|
@ -52,7 +52,8 @@ it('should open devtools when "devtools: true" option is given', async ({ browse
|
|||
await browser.close();
|
||||
});
|
||||
|
||||
it('should return background pages', async ({ browserType, createUserDataDir, asset }) => {
|
||||
it('should return background pages', async ({ browserType, createUserDataDir, asset, channel }) => {
|
||||
it.skip(channel === 'chromium-headless-shell', 'Headless Shell has no support for extensions');
|
||||
const userDataDir = await createUserDataDir();
|
||||
const extensionPath = asset('simple-extension');
|
||||
const extensionOptions = {
|
||||
|
@ -75,7 +76,8 @@ it('should return background pages', async ({ browserType, createUserDataDir, as
|
|||
expect(context.backgroundPages().length).toBe(0);
|
||||
});
|
||||
|
||||
it('should return background pages when recording video', async ({ browserType, createUserDataDir, asset }, testInfo) => {
|
||||
it('should return background pages when recording video', async ({ browserType, createUserDataDir, asset, channel }, testInfo) => {
|
||||
it.skip(channel === 'chromium-headless-shell', 'Headless Shell has no support for extensions');
|
||||
const userDataDir = await createUserDataDir();
|
||||
const extensionPath = asset('simple-extension');
|
||||
const extensionOptions = {
|
||||
|
@ -99,7 +101,8 @@ it('should return background pages when recording video', async ({ browserType,
|
|||
await context.close();
|
||||
});
|
||||
|
||||
it('should support request/response events when using backgroundPage()', async ({ browserType, createUserDataDir, asset, server }) => {
|
||||
it('should support request/response events when using backgroundPage()', async ({ browserType, createUserDataDir, asset, server, channel }) => {
|
||||
it.skip(channel === 'chromium-headless-shell', 'Headless Shell has no support for extensions');
|
||||
server.setRoute('/empty.html', (req, res) => {
|
||||
res.writeHead(200, { 'Content-Type': 'text/html', 'x-response-foobar': 'BarFoo' });
|
||||
res.end(`<span>hello world!</span>`);
|
||||
|
@ -148,7 +151,8 @@ it('should support request/response events when using backgroundPage()', async (
|
|||
|
||||
it('should report console messages from content script', {
|
||||
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32762' }
|
||||
}, async ({ browserType, createUserDataDir, asset, server }) => {
|
||||
}, async ({ browserType, createUserDataDir, asset, server, channel }) => {
|
||||
it.skip(channel === 'chromium-headless-shell', 'Headless Shell has no support for extensions');
|
||||
const userDataDir = await createUserDataDir();
|
||||
const extensionPath = asset('extension-with-logging');
|
||||
const extensionOptions = {
|
||||
|
|
|
@ -19,6 +19,7 @@ import { PNG } from 'playwright-core/lib/utilsBundle';
|
|||
import { expect, playwrightTest as it } from '../config/browserTest';
|
||||
|
||||
it.use({ headless: false });
|
||||
it.skip(({ channel }) => channel === 'chromium-headless-shell');
|
||||
|
||||
it('should have default url when launching browser @smoke', async ({ launchPersistent }) => {
|
||||
const { context } = await launchPersistent();
|
||||
|
|
|
@ -41,9 +41,10 @@ it('should kill browser process on timeout after close', async ({ browserType, m
|
|||
expect(stalled).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should throw a friendly error if its headed and there is no xserver on linux running', async ({ mode, browserType, platform }) => {
|
||||
it('should throw a friendly error if its headed and there is no xserver on linux running', async ({ mode, browserType, platform, channel }) => {
|
||||
it.skip(platform !== 'linux');
|
||||
it.skip(mode.startsWith('service'));
|
||||
it.skip(channel === 'chromium-headless-shell', 'Headless Shell is always headless');
|
||||
|
||||
const error: Error = await browserType.launch({
|
||||
headless: false,
|
||||
|
|
Loading…
Reference in New Issue