playwright
No long description provided.
Installation
dagger install github.com/StaytunedLLP/devops/playwright@73f572315a66a4f55adb53f06b1f5fad3e1c53f6Entrypoint
Return Type
Playwright Example
dagger -m github.com/StaytunedLLP/devops/playwright@73f572315a66a4f55adb53f06b1f5fad3e1c53f6 call \
func (m *MyModule) Example() *dagger.Playwright {
return dag.
Playwright()
}@function
def example() -> dagger.Playwright:
return (
dag.playwright()
)@func()
example(): Playwright {
return dag
.playwright()
}Types
Playwright 🔗
test() 🔗
Run Playwright E2E tests for the provided project source.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Project source directory containing package.json and Playwright tests. |
| nodeAuthToken | Secret ! | - | GitHub NPM token for authenticating with |
| testSelector | String ! | "" | Optional string to pass to test script (selector or path). |
| testScript | String ! | "test:e2e" | Name of the npm script to run for testing (default: test:e2e). |
| runBuild | Boolean ! | true | Whether to run 'npm run build' before testing (default: true). |
| registryScope | String ! | "staytunedllp" | GitHub Packages registry owner scope (default: staytunedllp). |
Example
dagger -m github.com/StaytunedLLP/devops/playwright@73f572315a66a4f55adb53f06b1f5fad3e1c53f6 call \
test --source DIR_PATH --node-auth-token env:MYSECRET --test-selector string --test-script string --run-build boolean --registry-scope stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, nodeAuthToken *dagger.Secret, testSelector string, testScript string, runBuild bool, registryScope string) string {
return dag.
Playwright().
Test(ctx, source, nodeAuthToken, testSelector, testScript, runBuild, registryScope)
}@function
async def example(source: dagger.Directory, node_auth_token: dagger.Secret, test_selector: str, test_script: str, run_build: bool, registry_scope: str) -> str:
return await (
dag.playwright()
.test(source, node_auth_token, test_selector, test_script, run_build, registry_scope)
)@func()
async example(source: Directory, nodeAuthToken: Secret, testSelector: string, testScript: string, runBuild: boolean, registryScope: string): Promise<string> {
return dag
.playwright()
.test(source, nodeAuthToken, testSelector, testScript, runBuild, registryScope)
}