vendredi 20 juillet 2018

Get popup modal innerHTML in Ember Qunit test

I'm doing integration component testing with ember-qunit. So how to get popup modal body text once its open from an action.

text-bar-test

test('it renders with title', function(assert) {
    assert.expect(1);

    this.render(hbs``);
    this.$('.open-app').click();  // opening from text-bar hbs template
    assert.equal(this.$('.body-text').innerHTML(), 'its modal-body text', 'Modal body text test once opens');

});




Aucun commentaire:

Enregistrer un commentaire