Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
testarmada-nightwatch-extra
Advanced tools
Enhanced nightwatchjs commands and assertions.
In nightwatch.json
add following content
"custom_assertions_path": [
"./node_modules/testarmada-nightwatch-extra/lib/assertions"
],
"custom_commands_path": [
"./node_modules/testarmada-nightwatch-extra/lib/commands"
]
If you're using this repo together with testarmada-magellan, your base test can inherit from the base test by
var BaseTest = require("testarmada-nightwatch-extra/lib/base-test-class");
For full example, please checkout boilerplate-nightwatch
If you're familiar with nightwatch
or are looking to translate nightwatch
examples into nightwatch-extra
, refer to the tables below for equivalent enhanced (i.e. more reliable) versions of nightwatch
commands and assertions.
All commands and assertions are fully compatible with nightwatchjs page object.
Nightwatch-Extra Equivalent | Nightwatch Command |
---|---|
clickAutomationEl("mybutton") | click("[data-automation-id="mybutton"]) |
clickEl(selector) | click(selector) |
getEl(selector) | waitForElementPresent or waitForElementVisible |
moveToEl(selector, xoffset, yoffset) | moveToElement |
setElValue(selector, value) | setValue(selector, value) |
getElValue(selector, callback) | getValue(selector) |
getEls(selector, callback) | elements(using, value, callback) |
setMaskedElValue(selector, value, [fieldLength]) | (no nightwatch equivalent) |
getPerformance(url) | Retrieves basic performance metrics using Navigation API (http://www.w3.org/TR/navigation-timing/) |
waitForElNotPresent(selector) | waitForElementNotPresent(selector) |
Nightwatch-Extra Equivalent | Nightwatch Assertion |
---|---|
assert.elContainsText(selector, regex or text) | assert.containsText(selector, text) |
assert.elNotContainsText(selector, text) | (no nightwatch equivalent) |
assert.selectorHasLength(selector, expectedLength) | (no nightwatch equivalent) |
assert.elLengthGreaterThan(selector, selectUsing, lengthToCompare) | (no nightwatch equivalent) |
All Nightwatch commands and assertions are supported out of the box.
fail
equal
notEqual
deepEqual
notDeepEqual
strictEqual
notStrictEqual
throws
doesNotThrow
ifError
If you're migrating from magellan-nightwatch to nightwatch-extra, please follow the steps
./node_modules/testarmada-magellan-nightwatch
from your project.package.json
dependencies:{
"testarmada-magellan-nightwatch: VERSION <---- DELETE THIS LINE
"testarmada-nightwatch-extra: "^1.0.0" <---- ADD THIS LINE
}
npm install
again under your project root folder.nightwatch.json
file has the following changes"custom_commands_path":[
"./node_modules/testarmada-magellan-nightwatch/lib/commands" <---- DELETE THIS LINE
"./node_modules/testarmada-nightwatch-extra/lib/commands" <---- ADD THIS LINE
],
"custom_assertions_path":[
"./node_modules/testarmada-magellan-nightwatch/lib/assertions" <---- DELETE THIS LINE
"./node_modules/testarmada-nightwatch-extra/lib/assertions" <---- ADD THIS LINE
]
require("testarmada-magellan-nightwatch/lib/base-test-class"); <---- DELETE THIS LINE
require("testarmada-nightwatch-extra/lib/base-test-class"); <---- ADD THIS LINE
FAQs
extra useful nightwatch command and assertion
The npm package testarmada-nightwatch-extra receives a total of 138 weekly downloads. As such, testarmada-nightwatch-extra popularity was classified as not popular.
We found that testarmada-nightwatch-extra demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.