codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS
http://codecept.io
MIT License
4.12k stars 727 forks source link

Add `seeNumberOfElements` to nightmareJS helper #773

Closed lougreenwood closed 6 years ago

lougreenwood commented 7 years ago

What are you trying to achieve?

We recently moved from Webdriver to Nightmare. It seems that Nightmare is lacking the seeNumberOfElements method.

Previously, using Webdriver & seeNumberOfElements we could verify an exact number of specific element. This is very useful for testing form validation (for example: test that we see 5 validation errors, fill some field, see that we now only see 4 validation errors.)

Since moving to Nightmare, we now have to use seeElement. This is binary and makes the tests much less robust.

pmoncadaisla commented 6 years ago

Implemented and merged in: https://github.com/Codeception/CodeceptJS/pull/930

reubenmiller commented 6 years ago

Included in v1.1.5 :)