@testcafe-community/nx-builder
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@testcafe-community/nx-builder

A custom Angular/nx builder for TestCafe. Serves the Angular/nx application, and then runs the TestCafe tests. Forked from https://github.com/politie/angular-testcafe

Install

$ npm install --save-dev @testcafe-community/nx-builder

Use in angular.json

{
  "projects": {
    "my-project-e2e": {
      "architect": {
        "e2e": {
          "builder": "@testcafe-community/nx-builder:testcafe",
          "options": {
            "browsers": [
              "chrome --no-sandbox",
              "firefox"
            ],
            "clientScripts":{"module":"@testing-library/dom/dist/@testing-library/dom.umd.js"},
            "src": ["e2e/*.e2e-spec.ts"],
            "video":{
              "path":"artifacts",
              "options":{
                "pathPattern":"${TEST}/${USERAGENT}/${FILE_INDEX}.mp4"
              },
              "encodingOptions":{
                "r": 20,
                "aspect": "4:3"
              }
            }
            "reporters": [
              {
                "name": "html",
                "output": "path/to/my/report.html"
              },
              {
                "name": "spec"
              }
            ]
          }
        }
      }
    }
  }
}

NOTE: check schema.json for a list of all options

A tutorial how to use Angular and Testcafe combined with this builder can be found here

build

$ npm run build

pack

$ npm pack

NOT Implemented (TODO):

  • remote browsers
  • QR code
  • ssl

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    30
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    30
  • 1.0.1
    0

Package Sidebar

Install

npm i @testcafe-community/nx-builder

Weekly Downloads

30

Version

1.1.0

License

MIT

Unpacked Size

24.9 kB

Total Files

7

Last publish

Collaborators

  • benmonro