enzymejs/enzyme

click to simulate an active div tag

Offen

#1.426 geöffnet am 11.12.2017

 (12 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.967 Forks)batch import
docshelp wantedv3 expected difference

Repository-Metriken

Stars
 (19.825 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi guys, I'm here with another issue. Its reactjs. my tags are similar to following:- <div class="conversationItem"><span>piloy</span>.....</div> Onclick, the div will change to following:- <div class="conversationItem active"><span>piloy</span>.....</div>

This is the test i wrote to simulate the click activity:-

            wrapper.find('div.conversationItem').simulate('click');
            wrapper.update();
            expect(wrapper.find('div.conversationItem.active')).to.have.length(1);

But its not working as i expected. div.conversationItem.active is never found. it's count is 0. People, Please help me to overcome this.

Contributor Guide