aptible / dashboard.aptible.com

DEPRECATED - Ember.js dashboard for the Aptible PaaS
https://dashboard.aptible.com
MIT License
81 stars 35 forks source link

Use assert.hasElement for app and db sidbar tests #772

Closed bantic closed 7 years ago

bantic commented 7 years ago

In the course of fixing some JSHint errors in the tests I noticed a small JavaScript gotcha that was causing some tests to redundantly pass. The find test helper function returns [] when it doesn't find anything, but [] is truthy, so assertions like: assert.ok(find('.not-present')) were present and passing.

This PR adds a assert.hasElement(selector, message) assertion that I will introduce to other tests as I come across them.

cc @sandersonet

bantic commented 7 years ago

I skip'd two tests that were false-positive passing before but actually are failing now. I did a bit of investigation to determine why and will dig into it more tomorrow.

skylar-anderson commented 7 years ago

👍 Thanks for this @bantic!