Skip to content

Commit

Permalink
Merge branch 'master' into joshblack-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Mar 5, 2020
2 parents dcda247 + f3049c1 commit 05086ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/components/tests/spec/tooltip--simple_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Promise, { delay } from 'bluebird';
import Tooltip from '../../src/components/tooltip/tooltip--simple';
import TooltipDefinitionHTML from '../../html/tooltip/tooltip--definition.html';
import TooltipIconHTML from '../../html/tooltip/tooltip--icon.html';
Expand Down Expand Up @@ -95,15 +94,14 @@ describe('Test simple tooltip', function() {
});

it('Should not have visible class after mouseleave', async function() {
await new Promise(resolve => {
resolve(
element.dispatchEvent(
new CustomEvent('mouseleave', { bubbles: true })
)
);
return Tooltip.__with__({
debounce: fn => fn,
})(() => {
tooltip.release();
tooltip = new Tooltip(element);
element.dispatchEvent(new CustomEvent('mouseleave', { bubbles: true }));
expect(element.classList.contains('bx--tooltip--visible')).toBe(false);
});
await delay(100);
expect(element.classList.contains('bx--tooltip--visible')).toBe(false);
});

it('Should not have hidden class after focus', function() {
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export default class Dropdown extends React.Component {
<span
id={fieldLabelId}
className={`${prefix}--list-box__label`}
title={selectedItem ? itemToString(selectedItem) : label}
{...getLabelProps()}>
{selectedItem ? itemToString(selectedItem) : label}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ exports[`Dropdown should render 1`] = `
className="bx--list-box__label"
htmlFor="downshift-0-input"
id="dropdown-field-label-test-dropdown"
title="input"
>
input
</span>
Expand Down Expand Up @@ -287,6 +288,7 @@ exports[`Dropdown should render custom item components 1`] = `
className="bx--list-box__label"
htmlFor="downshift-4-input"
id="dropdown-field-label-test-dropdown"
title="input"
>
input
</span>
Expand Down Expand Up @@ -619,6 +621,7 @@ exports[`Dropdown should render with strings as items 1`] = `
className="bx--list-box__label"
htmlFor="downshift-3-input"
id="dropdown-field-label-test-dropdown"
title="input"
>
input
</span>
Expand Down

0 comments on commit 05086ae

Please sign in to comment.