Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jill64/playwright-config

🎭 Reusable My Playwright Config
https://github.com/jill64/playwright-config

config playwright reusable workflow

Last synced: 3 months ago
JSON representation

🎭 Reusable My Playwright Config

Awesome Lists containing this project

README

        

# @jill64/playwright-config

npm-version npm-license npm-download-month npm-min-size duplex-playwright.yml run-playwright.yml

🎭 Reusable My Playwright Config

## Installation

```sh
npm i -D @jill64/playwright-config
```

## Usage

playwright.config.ts

```ts
import { extendsConfig } from '@jill64/playwright-config'

export default extendsConfig({
webServer: {
command: 'npm run preview',
port: 4173
}
})
```

## Use Vite Local Preview

```ts
import { extendsConfig, vitePreview } from '@jill64/playwright-config'

export default extendsConfig(vitePreview)
```

## Use Real Server

```ts
import { extendsConfig, vitePreview, branchPreview } from '@jill64/playwright-config'

export default extendsConfig(branchPreview({
provider: 'cloudflare',
fallback: vitePreview
})
```

## GitHub Workflow

```yml
name: CI

on: push

jobs:
test:
uses: jill64/playwright-config/.github/workflows/[email protected]
with:
pre-test: npm run build
test-command: npx playwright test
provider: cloudflare
```

## License

[MIT](LICENSE)