mardi 30 avril 2019

How to wait for bootstrap modal animation to finish in Vue jest test

Is it possible to wait for modal animation to finish in Vue jest test? My problem is that when I click on the button (button.add_modal), div.my-modal should get a class "show", but after triggering my button, seems that the class isn't attached in my html (in jest test), in dev tools in works fine.

    wrapper.find('button.add_modal').trigger('click');
    //This should return true, but I'm getting false.
    expect(wrapper.contains('div#my-modal.show')).toBe(true);

Aucun commentaire:

Enregistrer un commentaire