{"id":15046983,"url":"https://github.com/jfgreffier/playwright-ng-schematics","last_synced_at":"2026-04-02T10:34:44.248Z","repository":{"id":246795767,"uuid":"822728727","full_name":"jfgreffier/playwright-ng-schematics","owner":"jfgreffier","description":"Adds Playwright Test to your Angular project","archived":false,"fork":false,"pushed_at":"2026-02-25T20:31:39.000Z","size":902,"stargazers_count":20,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T22:37:00.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/playwright-ng-schematics","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfgreffier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-01T17:41:52.000Z","updated_at":"2026-02-25T20:31:43.000Z","dependencies_parsed_at":"2024-07-26T21:13:58.368Z","dependency_job_id":"70c61789-3d32-47e4-89de-0483f0602103","html_url":"https://github.com/jfgreffier/playwright-ng-schematics","commit_stats":null,"previous_names":["jfgreffier/playwright-ng-schematics","playwright-community/playwright-ng-schematics"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/jfgreffier/playwright-ng-schematics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfgreffier%2Fplaywright-ng-schematics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfgreffier%2Fplaywright-ng-schematics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfgreffier%2Fplaywright-ng-schematics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfgreffier%2Fplaywright-ng-schematics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfgreffier","download_url":"https://codeload.github.com/jfgreffier/playwright-ng-schematics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfgreffier%2Fplaywright-ng-schematics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29917950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T20:53:50.174Z","updated_at":"2026-02-27T22:42:59.498Z","avatar_url":"https://github.com/jfgreffier.png","language":"TypeScript","funding_links":[],"categories":["Integrations","Testing"],"sub_categories":["E2E"],"readme":"# Playwright Angular Schematic\n\n[![NPM Version](https://img.shields.io/npm/v/playwright-ng-schematics)](https://www.npmjs.com/package/playwright-ng-schematics)\n[![Playwright version](https://img.shields.io/npm/v/playwright?label=Playwright)](https://playwright.dev/)\n[![Awesome](https://awesome.re/badge.svg)](https://github.com/mxschmitt/awesome-playwright)\n\nAdds [Playwright Test](https://playwright.dev/) to your Angular project \n\n- Installs Playwright Test\n- Set up `ng e2e` for you\n- Adds configuration to `angular.json` for easy integration into your existing project\n- `ng generate` e2e tests\n\n\u003cimg src=\"docs/playwright-schematics.gif\" alt=\"demo of ng e2e installing Playwright, then running end-to-end tests\" width=\"800\"/\u003e\n\n## Installation\n\nRun the following to add Playwright to your Angular project. `ng add` will pick the correct version of this schematic automatically\n```bash\nng add playwright-ng-schematics\n```\n\nOnce installed, you can run the tests\n```bash\nnpm run e2e\n```\n\n## Requirements\n\nAngular 18+\n\n## Usage\n\n### Run tests\n\nYou can also use the Angular CLI `ng` to run your tests\n```bash\nng e2e\n```\n\nYou can use almost the same command-line interface options that exist for Playwright (see [Playwright Docs](https://playwright.dev/docs/test-cli) or use `ng e2e --help`), such as UI mode\n```bash\nng e2e --ui\n# or\nnpm run e2e -- --ui\n```\n\nTo specify particular test files, usually done like this `npx playwright test tests/todo-page/ tests/landing-page/`, you have to prepend the `--files` argument.\n```bash\nng e2e --files tests/todo-page/ --files tests/landing-page/\n```\nThe `-c` option is used to choose an Angular configuration. If you also want to specify a Playwright configuration, use `--config` instead.\n\n### Start an Angular development server\n\nIf a `devServerTarget` option is specified, the builder will launch an Angular server and will automatically set the `PLAYWRIGHT_TEST_BASE_URL` environment variable.\n\n```json title=\"angular.json\"\n        \"e2e\": {\n          \"builder\": \"playwright-ng-schematics:playwright\",\n          \"options\": {\n            \"devServerTarget\": \"my-app:serve\",\n            \"ui\": true\n          },\n          \"configurations\": {\n            \"production\": {\n              \"devServerTarget\": \"my-app:serve:production\"\n            }\n          }\n        }\n```\n\nYou can additionaly override the `port` of the dev server. It's handy when you want to run dev server and Playwright tests on different ports.\n```json title=\"angular.json\"\n        \"e2e\": {\n          \"builder\": \"playwright-ng-schematics:playwright\",\n          \"options\": {\n            \"devServerTarget\": \"my-app:serve\",\n            \"port\": 0\n          }\n        }\n```\n\nYou still can make use of Playwright's `baseURL` option and mix it with `PLAYWRIGHT_TEST_BASE_URL` env variable.  \nThe example below shows projects using `PLAYWRIGHT_TEST_BASE_URL` (set by `devServerTarget`) or another base URL.\n\n```ts title=\"playwright.config.ts\"\n  // ...\n  projects: [\n    {\n      name: 'chromium',\n      use: { ...devices['Desktop Chrome'], baseURL: process.env['PLAYWRIGHT_TEST_BASE_URL'] },\n    },\n\n    {\n      name: 'firefox',\n      use: { ...devices['Desktop Firefox'], baseURL: 'http://example.com' },\n    },\n  ]\n```\n\n### Create a test file\n\nCreate a new empty test\n```bash\nng generate playwright-ng-schematics:e2e \"\u003cTestName\u003e\"\n```\n\nor with CLI prompt of the name\n```bash\nng generate playwright-ng-schematics:e2e\n```\n\n## Migrating from Protractor\n\nStill using Protractor ?\n\nRead the [Migrating from Protractor](https://playwright.dev/docs/protractor) guide on the official Playwright website.\n\n## Contribute\n\n- Small, incremental changes are easier to review.\n- Conventional Commits. NO EMOJI\n\n## License\n\nThis project is licensed under an Apache-2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfgreffier%2Fplaywright-ng-schematics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfgreffier%2Fplaywright-ng-schematics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfgreffier%2Fplaywright-ng-schematics/lists"}