You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pass/fail messages emitted by the node assertions (referred to as static assertions in Nigtwatch) are not ideal and should be fixed.
This is essential to get the correct assertion messages in the new Element API assertions.
Let's take the example of .ok() assertion:
await browser.assert.ok(true) -- seems okayish but could be improved
await browser.assert.ok(false) -- needs to be improved. Instead of the whole block inside (), something simple could be used like: "Testing the value to be truthy". Also, instead of expected "true", this could be expected "a truthy value".
await browser.assert.not.ok(false) -- needs to be improved. Instead of the whole block inside (), something simple could be used like: "Testing the value to be not truthy".
browser.assert.not.ok(true) -- MOST IMPORTANT - the message should show the correct expected and actual values instead of "null".
Additional information
The code for the static assertions is present in lib/_loaders/static.js file.
All available Node Assertions in Nightwatch can be found here:
Description of the bug/issue
The pass/fail messages emitted by the node assertions (referred to as static assertions in Nigtwatch) are not ideal and should be fixed.
This is essential to get the correct assertion messages in the new Element API assertions.
Let's take the example of
.ok()
assertion:await browser.assert.ok(true)
-- seems okayish but could be improvedawait browser.assert.ok(false)
-- needs to be improved. Instead of the whole block inside()
, something simple could be used like: "Testing the value to be truthy". Also, instead ofexpected "true"
, this could beexpected "a truthy value"
.await browser.assert.not.ok(false)
-- needs to be improved. Instead of the whole block inside()
, something simple could be used like: "Testing the value to be not truthy".browser.assert.not.ok(true)
-- MOST IMPORTANT - the message should show the correct expected and actual values instead of "null".Additional information
The code for the static assertions is present in
lib/_loaders/static.js
file.All available Node Assertions in Nightwatch can be found here:
nightwatch/types/assertions.d.ts
Line 544 in 8f4a330
The text was updated successfully, but these errors were encountered: