Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/playwright.config.ts
Joe Previte 690e0aff45
fix: add handle for resolveExternalUri (#5624)
* fix: add handle for resolveExternalUri

This adds a fix to properly handle `resolveExternalUri` which is used by
extensions like Tabnine.

* fixup!: update patch

* fixup!: force update proxy patch

* fixup!: use proxyEndpointTemplate else manually add

* fixup!: throw error if productConfiguration missing

* feat(testing): add asExternalUri

This modifies the test extension used in e2e test by registering a new
command for testing `asExternalUri`.

* feat: add e2e test for asExternalUri

* docs: update playwright setup comments

* feat: add support for VSCODE_PROXY_URI

* chore: refresh patches

* feat: add test for VSCODE_PROXY_URI

* chore: add metadata to lang extension

* fixup!: fix part of service-worker patch

* fixup!: remove e2e test, update patch notes

* fixup!: refresh disable-downloads

* fixup!: formatting
2022-10-14 16:08:58 +00:00

43 lines
1.3 KiB
TypeScript

import { PlaywrightTestConfig } from "@playwright/test"
import path from "path"
// The default configuration runs all tests in three browsers with workers equal
// to half the available threads. See 'yarn test:e2e --help' to customize from
// the command line. For example:
// yarn test:e2e --workers 1 # Run with one worker
// yarn test:e2e --project Chromium # Only run on Chromium
// yarn test:e2e --grep login # Run tests matching "login"
// PWDEBUG=1 yarn test:e2e # Run Playwright inspector
const config: PlaywrightTestConfig = {
testDir: path.join(__dirname, "e2e"), // Search for tests in this directory.
timeout: 60000, // Each test is given 60 seconds.
retries: process.env.CI ? 2 : 1, // Retry in CI due to flakiness.
// Limit the number of failures on CI to save resources
maxFailures: process.env.CI ? 3 : undefined,
globalSetup: require.resolve("./utils/globalE2eSetup.ts"),
reporter: "list",
// Put any shared options on the top level.
use: {
headless: true, // Run tests in headless browsers.
video: "retain-on-failure",
},
projects: [
{
name: "Chromium",
use: { browserName: "chromium" },
},
{
name: "Firefox",
use: { browserName: "firefox" },
},
{
name: "WebKit",
use: { browserName: "webkit" },
},
],
}
export default config