-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The currentState is not reflecting with the value based on defaultState value. Example:
<toggle-button :defaultState="true" />
Now the currentState should also be true. Test Case
it ('should work with dynamic state change', async () => {
expect(wrapper.find('.toggle__label').text()).to.contain('Off');
expect(wrapper.vm.currentState).to.be.false;
wrapper.setProps({
defaultState: true
});
await wrapper.vm.$nextTick();
expect(wrapper.find('.toggle__label').text()).to.contain('On');
expect(wrapper.vm.currentState).to.be.true;
});Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working