FoamFactory / FoamFactory/taphandle
Test issue: Calling `ComponentBehaviors.getInstance()` prior to the first `it` test in password.spec.js causes failure
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The following test:
```
it ('should switch the icon when the show password icon is clicked', () => {
// TODO_jwir3: There's a bug here. If ComponentBehaviors.getInstance() is
// called one or more times _BEFORE_ this test, then the test fails.
let eyeIcon = document.getElementById('eye-icon-password');
expect(eyeIcon).not.toBeNull();
eyeIcon.click();
eyeIcon = document.getElementById('eye-icon-password');
expect(eyeIcon).not.toBeNull();
expect(_.values(eyeIcon.classList)).toEqual(expect.arrayContaining(['fa-eye-slash']));
});
```
Fails if there is _any_ test that runs before it in the same block. It might be because the password reveal indicator is having multiple handlers added to it, but it's unclear. It doesn't seem to be reproducible in the examples.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.