0.0.5 • Published 1 year ago

@codeceptjs-plugins/html-snapshot-on-fail v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@codeceptjs-plugins/html-snapshot-on-fail

npm license

This plugin takes a snapshot of the current page HTML and saves it to a file when a test fails.

Installation

npm i --save-dev @codeceptjs-plugins/html-snapshot-on-fail
yarn add --dev @codeceptjs-plugins/html-snapshot-on-fail

Basic usage

exports.config = {
  plugins: {
    htmlSnapshotOnFail: {
      require: "@codeceptjs-plugins/html-snapshot-on-fail",
      enabled: true
    }
  }
}

configure custom output directory

const path = require('path')

exports.config = {
  plugins: {
    htmlSnapshotOnFail: {
      require: "@codeceptjs-plugins/html-snapshot-on-fail",
      enabled: true,
      rootDir: path.resolve('output'),
      dirname: 'error-html-snapshots'
    }
  }
}

connect to allure reporter

exports.config = {
  plugins: {
    allure: {
      require: "<require path>",
    },
    htmlSnapshotOnFail: {
      require: "@codeceptjs-plugins/html-snapshot-on-fail",
      enabled: true,
      reporter: 'allure' // key of registered allure plugin in "exports.config.plugins"
    }
  }
}
0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago