-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(configuration): add playwright configuration and test
- Loading branch information
Showing
6 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Template } from '../types' | ||
|
||
export const templates: Template = {} // Has no templates, highly customizable. | ||
|
||
export function createFile() { | ||
return { | ||
name: 'playwright.config.ts', | ||
contents: `import { defineConfig } from '@playwright/test' | ||
import { playwright } from './configuration.ts' | ||
export default defineConfig(playwright)`, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
import { devices } from '@playwright/test' | ||
|
||
export const prettier = 'recommended' | ||
|
||
export const playwright = { | ||
fullyParallel: true, | ||
workers: process.env.CI ? 1 : undefined, | ||
projects: [ | ||
{ | ||
name: 'chromium', | ||
use: { ...devices['Desktop Chrome'] }, | ||
}, | ||
], | ||
webServer: { | ||
command: 'bun start', | ||
url: 'http://localhost:3000', | ||
reuseExistingServer: !process.env.CI, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
export type Template<T = object> = { [key: string]: T } | ||
|
||
export type Configuration = { | ||
name: string | ||
alias?: string | ||
configuration: { | ||
templates: Template | ||
// biome-ignore lint/suspicious/noExplicitAny: Will be specified in file explicitly. | ||
createFile: (value?: any) => { name: string; contents: string } | ||
} | ||
} |