{"id":14449510,"url":"https://github.com/nightwatchjs/nightwatch-plugin-angular","last_synced_at":"2026-02-20T00:01:44.282Z","repository":{"id":152211543,"uuid":"616395379","full_name":"nightwatchjs/nightwatch-plugin-angular","owner":"nightwatchjs","description":"Component testing support for Angular","archived":false,"fork":false,"pushed_at":"2024-05-16T12:11:01.000Z","size":51612,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-30T00:55:17.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nightwatchjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-03-20T10:02:33.000Z","updated_at":"2024-08-31T20:20:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"4e8ab2fd-2fd6-484c-916a-4a7d5f439be3","html_url":"https://github.com/nightwatchjs/nightwatch-plugin-angular","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":"0.18181818181818177","last_synced_commit":"59278eb01ce972396604ea823e23fe12dbb61d1e"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightwatchjs%2Fnightwatch-plugin-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightwatchjs%2Fnightwatch-plugin-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightwatchjs%2Fnightwatch-plugin-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightwatchjs%2Fnightwatch-plugin-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nightwatchjs","download_url":"https://codeload.github.com/nightwatchjs/nightwatch-plugin-angular/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238939120,"owners_count":19555600,"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-09-01T08:01:20.679Z","updated_at":"2025-10-18T10:05:04.458Z","avatar_url":"https://github.com/nightwatchjs.png","language":"HTML","readme":"# @nightwatch/angular\n\u003cp align=center\u003e\n  \u003ca href=\"https://nightwatchjs.org\" target=\"_blank\"\u003e\n  \u003cimg alt=\"Nightwatch.js Logo\" src=\"https://raw.githubusercontent.com/nightwatchjs/nightwatch-plugin-react/main/.github/assets/nightwatch-logo.png\" width=200 /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://angular.io/\" target=\"_blank\" style=\"padding-left: 15px\"\u003e\n  \u003cimg alt=\"Angular Logo\" src=\"https://user-images.githubusercontent.com/2018070/227150972-6ba1dcca-c2d0-4a19-9858-c06cba10a179.png\" width=185 /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n[![Discord][discord-badge]][discord]\n[![Build Status][build-badge]][build]\n[![MIT License][license-badge]][license]\n[![version][version-badge]][package]\n\nOfficial Nightwatch plugin which adds component testing support for Angular apps. It uses the [Webpack DevServer](https://vitejs.dev/) under the hood. Requires Nightwatch 2.4+\n\n\n## Setup:\nInstall nightwatch angular plugin in your project:\n\n```bash\nnpm install @nightwatch/angular\n```\n\nUpdate your [Nightwatch configuration](https://nightwatchjs.org/guide/configuration/overview.html) and add the plugin to the list:\n\n```js\nmodule.exports = {\n  plugins: ['@nightwatch/angular'],\n\n  // other nightwatch settings...\n}\n```\n*Note: For the plugin to function, you must configure the path to the root directory of your angular project.*\n\n\n## Usage\n\nThis plugin includes a Nightwatch commands which can be used to mount Angular components.\n\n###  browser.mountComponent(`componentPath`, `[callback]`):\n**Parameters:**\n- `componentPath` – location of the component file (`/path/to/component/*.component`) to be mounted\n- `callback` – an optional callback function which will be called with the component element\n\n#### Example:\n```js\n\nit('Test Form Component', async function (browser) {\n  const component = await browser.mountComponent('/src/components/Form.component');\n\n  expect(component).text.to.equal('form-component works!');\n});\n```\n\n## Configuration\n### - projectRoot\nNightwatch angular plugin needs to know the root directory of the angular project for which the tests are written. By default this is set as the current directory (`'./'`). This can be overridden using the projectRoot property like this:\n\n```js\nmodule.exports = {\n\n  '@nightwatch/angular': {\n    projectRoot: 'path/to/angular/project' // defaults to current directory\n  },\n\n  // other nightwatch settings...\n}\n```\n### - port\nThe angular plugin uses webpack dev server to compile and render angular components. By default it uses port `5173` to serve the rendered pages. This can be overridden using the following configurations:\n```js\nmodule.exports = {\n\n  'webpack_dev_server': {\n    port: 10096 // defaults to 5173\n  },\n\n  // other nightwatch settings...\n}\n```\n\n# License\nMIT\n\n[build-badge]: https://github.com/nightwatchjs/nightwatch-plugin-angular/actions/workflows/node.js.yml/badge.svg?branch=main\n[build]: https://github.com/nightwatchjs/nightwatch-plugin-angular/actions/workflows/node.js.yml\n[version-badge]: https://img.shields.io/npm/v/@nightwatch/angular.svg?style=flat-square\n[package]: https://www.npmjs.com/package/@nightwatch/angular\n[license-badge]: https://img.shields.io/npm/l/@nightwatch/angular.svg?style=flat-square\n[license]: https://github.com/nightwatchjs/@nightwatch/angular/blob/main/LICENSE\n[discord-badge]: https://img.shields.io/discord/618399631038218240.svg?color=7389D8\u0026labelColor=6A7EC2\u0026logo=discord\u0026logoColor=ffffff\u0026style=flat-square\n[discord]: https://discord.gg/SN8Da2X\n\n","funding_links":[],"categories":["Recently Updated","Testing"],"sub_categories":["[Sep 01, 2024](/content/2024/09/01/README.md)","Component"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightwatchjs%2Fnightwatch-plugin-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightwatchjs%2Fnightwatch-plugin-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightwatchjs%2Fnightwatch-plugin-angular/lists"}