diff options
| author | Adam Soltys <[email protected]> | 2017-01-21 19:46:49 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2017-01-21 19:46:49 -0800 |
| commit | ba5200b50692b889f59df9f37c913b3ef85045c8 (patch) | |
| tree | 755d79cf488d383fe2ffaf123c91be51e879ef35 /test/e2e/custom-assertions/elementCount.js | |
| parent | c413e457579b68b7a92ab47cdd867202ee7bb47e (diff) | |
| download | coinos-server-ba5200b50692b889f59df9f37c913b3ef85045c8.tar.gz coinos-server-ba5200b50692b889f59df9f37c913b3ef85045c8.zip | |
Ditch client code
Diffstat (limited to 'test/e2e/custom-assertions/elementCount.js')
| -rw-r--r-- | test/e2e/custom-assertions/elementCount.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/e2e/custom-assertions/elementCount.js b/test/e2e/custom-assertions/elementCount.js deleted file mode 100644 index c0d5fe00..00000000 --- a/test/e2e/custom-assertions/elementCount.js +++ /dev/null @@ -1,26 +0,0 @@ -// A custom Nightwatch assertion. -// the name of the method is the filename. -// can be used in tests like this: -// -// browser.assert.elementCount(selector, count) -// -// for how to write custom assertions see -// http://nightwatchjs.org/guide#writing-custom-assertions -exports.assertion = function (selector, count) { - this.message = 'Testing if element <' + selector + '> has count: ' + count - this.expected = count - this.pass = function (val) { - return val === this.expected - } - this.value = function (res) { - return res.value - } - this.command = function (cb) { - var self = this - return this.api.execute(function (selector) { - return document.querySelectorAll(selector).length - }, [selector], function (res) { - cb.call(self, res) - }) - } -} |
