mobify / nightwatch-commands

A set of Mobify specific custom commands for Nightwatch.js
60 stars 18 forks source link

Add the ability to define global selectors #16

Closed gsaray closed 9 years ago

gsaray commented 10 years ago

For example, to use footer or header in one place and use it globally

jgermyn commented 10 years ago

From Steve:

We could have the global selectors be defined in another file somewhere.

i.e.

header, footer, etc

The elementsPresent assertion could merge the global selectors with the selectors defined in the command itself. We could have an extra parameter on the end of the test that determines whether we want to skip merging the selectors.