@jill64/playwright-config
Advanced tools
Comparing version 2.1.0 to 2.2.0
import { Config } from '@playwright/test'; | ||
declare const providers: readonly ["cloudflare", "vercel", "netlify"]; | ||
declare const providers: readonly ["cloudflare", "vercel"]; | ||
type Provider = (typeof providers)[number]; | ||
@@ -4,0 +4,0 @@ export declare const branchPreview: (options?: { |
import { vitePreview } from './vitePreview.js'; | ||
const providers = ['cloudflare', 'vercel', 'netlify']; | ||
const providers = ['cloudflare', 'vercel']; | ||
const { GITHUB_REF_NAME, GITHUB_REPOSITORY, HOSTING_PROVIDER } = process.env; | ||
@@ -27,5 +27,3 @@ export const branchPreview = (options) => { | ||
? `https://${project_name}.pages.dev` | ||
: provider === 'vercel' | ||
? `https://${project_name}.vercel.app` | ||
: `https://${project_name}.netlify.app`; | ||
: `https://${project_name}.vercel.app`; | ||
console.info(`Using ${baseURL} for preview.`); | ||
@@ -46,5 +44,3 @@ return { | ||
? `https://${sub}.${project_name}.pages.dev` | ||
: provider === 'vercel' | ||
? `https://${project_name}-git-${sub}-jill-64.vercel.app` | ||
: `https://${sub}--${project_name}.netlify.app`; | ||
: `https://${project_name}-git-${sub}-jill-64.vercel.app`; | ||
console.info(`Using ${baseURL} for preview.`); | ||
@@ -51,0 +47,0 @@ return { |
{ | ||
"name": "@jill64/playwright-config", | ||
"description": "🎭 Reusable My Playwright Config", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"type": "module", | ||
@@ -30,3 +30,4 @@ "main": "dist/index.js", | ||
"playwright", | ||
"reusable" | ||
"reusable", | ||
"workflow" | ||
], | ||
@@ -33,0 +34,0 @@ "scripts": { |
@@ -45,6 +45,22 @@ <!----- BEGIN GHOST DOCS HEADER -----> | ||
export default extendsConfig(branchPreview( | ||
export default extendsConfig(branchPreview({ | ||
provider: 'cloudflare', | ||
fallback: vitePreview | ||
)) | ||
}) | ||
``` | ||
## GitHub Workflow | ||
```yml | ||
name: CI | ||
on: push | ||
jobs: | ||
test: | ||
uses: jill64/playwright-config/.github/workflows/run-playwright.yml@v2.1.0 | ||
with: | ||
pre-test: npm run build | ||
test-command: npx playwright test | ||
provider: cloudflare | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8151
66
118