Buggy test
lingsuann02 opened this issue · comments
lingsuann02 commented
Wizard.test.js - Wizard caches step state in url - renders previous step on back button
Returns false positive.
test('renders previous step on back button', () => {
window.history.pushState({ activeStep: 'three' }, '', '?step=three');
// component does not update at this point therefore the expect is always true
window.history.back();
expect(component.find('#active-step').text()).toBe('Step two');
});
^^ Comment in code identifies the line of code that is generating the false positive.