lundi 10 octobre 2016

Ember 2.8: Test that a ember-bootstrap modal is open on page load

Since I'm not working with pure Bootstrap modals, I've been having trouble figuring out how to unit test for a modal that opens on page load. Here's the modal in question:


  //modal content


I tried adding a startModal class in hopes of somehow capturing it with find on my unit test

game-test.js

test('Initial modal shows up', function(assert) {
  visit('/');
  andThen(function () {
    assert.equal(find('.startModal').length, 1);
  });
});

This test passes, but it's not really what I'm looking for. I need to assert that the modal is actually shown and not just present.




Aucun commentaire:

Enregistrer un commentaire