Module: util/pageHelper

Methods


<static> createCallbackWrapper(callback)

Create a callback wrapper - we need to make sure that we have finished before we use the callback. If we have an error we invoke with error.

Parameters:
Name Type Description
callback

the callback we need to call


<static> isCodeBlockVisibleCallback(self [, expand])

Helper function which validate that a code block is visible

Parameters:
Name Type Argument Default Description
self Object

nightwatch page object

expand Boolean <optional>
true

if false we will not validate that a code is present, only that the click was successful.

Returns:
  • callback for onClick validations
Type
function

<static> notEmptyHelper(selector, self [, expectedMinimum])

Helper that validates, whether a certain selector return at least one entry

Parameters:
Name Type Argument Description
selector String

a css selector

self Object

nightwatch page object

expectedMinimum Number <optional>

the minimum which we await


<static> sanityCheck(self, response)

Helper function which validates basic integrity of a nightwatch response object.

Parameters:
Name Type Description
self Object

nightwatch page object

response Object

nightwatch response object