How to check if an element has a list of classes ?
Example:
expect(ShowMoreLessButton.hasClass('btn', 'btn-sm')).to.equal(true);
expect(['btn', 'btn-sm'].every(c => ShowMoreLessButton.hasClass(c))).to.equal(true)?
const wrapper = mount(
/>
);
const post = wrapper.find('article');
expect(['top', 'active'].every(c => post.hasClass(c))).to.equal(true);
I've just tested here and you can do expect(ShowMoreLessButton.hasClass('btn btn-sm')).to.equal(true);
It should support querying for multiple classes now, so I'll close this.
if 3 dropdown select then button clicked
Most helpful comment
expect(['btn', 'btn-sm'].every(c => ShowMoreLessButton.hasClass(c))).to.equal(true)?