{"id":22400117,"url":"https://github.com/currents-dev/currents-playwright-nx-example","last_synced_at":"2025-03-27T00:17:29.545Z","repository":{"id":264309524,"uuid":"893004560","full_name":"currents-dev/currents-playwright-nx-example","owner":"currents-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-19T23:44:23.000Z","size":987,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T04:52:20.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/currents-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-23T09:25:23.000Z","updated_at":"2025-01-23T19:58:31.000Z","dependencies_parsed_at":"2024-11-23T12:15:22.234Z","dependency_job_id":null,"html_url":"https://github.com/currents-dev/currents-playwright-nx-example","commit_stats":null,"previous_names":["currents-dev/currents-playwright-nx-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcurrents-playwright-nx-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcurrents-playwright-nx-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcurrents-playwright-nx-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/currents-dev%2Fcurrents-playwright-nx-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/currents-dev","download_url":"https://codeload.github.com/currents-dev/currents-playwright-nx-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245755683,"owners_count":20667027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-12-05T08:11:26.478Z","updated_at":"2025-03-27T00:17:29.527Z","avatar_url":"https://github.com/currents-dev.png","language":"TypeScript","readme":"# Currents Playwright NX Example\n\nThis repository shows how to use NX + Playwright with Currents.\n\n## Setup\n\n```sh\nnpm i -g nx@latest\nnpm i\n```\n\n## Run\n\nThe repo has two projects and each has its own tests.\n\n```sh\nCURRENTS_RECORD_KEY=recordkey \\\nCURRENTS_PROJECT_ID=projectid \\\nCURRENTS_CI_BUILD_ID=`date +%s` \\\nnx run-many -t e2e  --parallel=2 --verbose\n\n# ...\n\n NX   Running target e2e for 2 projects\n\n   →  Executing 2/2 remaining tasks in parallel...\n\n   ⠙  nx run e2e-01:e2e\n   ⠙  nx run e2e-02:e2e\n\n# ...\n\n NX   Ran target e2e for 2 projects (8s)\n\n   ✔  1/2 succeeded [0 read from cache]\n\n   ✖  1/2 targets failed, including the following:\n\n      - nx run e2e-01:e2e\n```\n\n### Output directory\n\nPlaywright output directory is set in `project.json` \u003e `targets.e2e.options.output`, for example:\n\n```json\n \"targets\": {\n    \"e2e\": {\n      \"executor\": \"@nx/playwright:playwright\",\n      \"options\": {\n        \"skipInstall\": true,\n        \"output\": \"{workspaceRoot}/playwright-report/{projectName}\",\n        \"config\": \"{projectRoot}/playwright.config.ts\"\n      }\n    }\n  }\n```\n\nAfter running the tests, results will appear as:\n\n```plain\nplaywright-report/\n├── e2e-01/\n│   └── .last-run.json\n└── e2e-02/\n    └── .last-run.json\n```\n\nℹ️ `playwright.config.ts` for each project use `nxE2EPreset` - it sets a different `output` directory, but `project.json:output` overrides it.\n\n### Last Failed\n\nnx passes down unrecognized arguments to the target command, for example\n\n```sh\nnx run-many -t e2e  --parallel=2 --verbose --last-failed\n# ...\n\n NX   Ran target e2e for 2 projects (7s)\n\n      With additional flags:\n        --last-failed=true\n# ...\n NX   Ran target e2e for 2 projects (7s)\n\n      With additional flags:\n        --last-failed=true\n\n   ✔  1/2 succeeded [0 read from cache]\n\n   ✖  1/2 targets failed, including the following:\n\n      - nx run e2e-01:e2e\n```\n\n## Single project orchestration\n\nThe project named `e2e-03` has a different target than the other two projects. The target is `or8n`\nThis target project executes `pwc-p` command. When using it in multiple machines it will execute in parallel the tests of this project.\n\n```sh\nCURRENTS_RECORD_KEY=recordkey \\\nCURRENTS_PROJECT_ID=projectid \\\nCURRENTS_CI_BUILD_ID=`date +%s` \\\nnx run-many -t or8n\n\n# ...\n\n NX   Running target or8n for 1 project\n\n   ⠙  nx run e2e-03:or8n\n```\n\nThe `parallel` flag is no longer needed as it is running a single nx project.\n\nThe `or8n.yml` file has an example for running it in Github actions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurrents-dev%2Fcurrents-playwright-nx-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurrents-dev%2Fcurrents-playwright-nx-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurrents-dev%2Fcurrents-playwright-nx-example/lists"}