Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@rpii/nightwatch-html-reporter
Advanced tools
Readme
This package generates an HTML report of the Nightwatch.js test using the Nightwatch reporter options.
Initially I looked at the work of Denis Denisov https://bl.ocks.org/denji/204690bf21ef65ac7778 to create a html-reporter for nightwatch.
It was missing good support for screenshots, but had other good features, such as use of handlebars.
I looked at the work by James Smith in nightwatch-html-reporter https://www.npmjs.com/package/nightwatch-html-reporter.
I decided to use this as a basis for the project structure, and utilized the integration into nightwatch demonstrated there.
This project is not a fork of either project but rather an integration of the handlebars technology into Jame's reporter framework.
For for all versions of Nightwatch
npm install @rpii/nightwatch-html-reporter
Requires Nightwatch >= 1.0.19.
/* Add to globals.js */
const HtmlReporter = require('@rpii/nightwatch-html-reporter');
const htmlReporter = new HtmlReporter({
openBrowser: true,
reportTitle: "Your Portal"
});
module.exports = {
"reporter" : htmlReporter.fn,
//gets the browser options into the report
"beforeEach": function(browser, done) {
htmlReporter.setBrowserOptions( browser.options);
done();
}
}
{
/* Title of the test report */
reportTitle: "Your Title Here",
/* True or False. If true the generated html will be opened
in your browser after the test run. */
openBrowser: true,
/* The directory you've set nightwatch to store your reports. */
reportsDirectory: __dirname + '/reports',
/* A prefix inserted in the front of the base filename. */
reportFilenamePrefix: '',
/* Create unique report names */
uniqueFilename: true,
/* Boolean. If true we ensure the generated report filename
is unique by appending a timestamp to the end. */
uniqueFilename: false,
/* The theme that will be used to generate the html report.
This should match a directory under the lib/themes directory. */
themeName: 'default',
/* Relative path to custom theme. When this is given,
`themeName` will be ignored. */
customTheme: 'relative/path/to/theme.html',
}
You can see examples of all of the available themes below. You can also create your own theme by creating a new folder under the them folder and copying the styles.css and html-report.html. The file 'lib/themes/default/html-report.html` is a handlebars template for the default theme. It is fairly easy to modify. The default uses featherlight for lightboxes for the screenshots.
Theme options that are available on command line and in the options block:
Copyright (c) 2019 Rich Peters Licensed under the MIT license.
FAQs
Generates an HTML view of the Nightwatch.js test reports using the Nightwatch reporter options.
We found that @rpii/nightwatch-html-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.