forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: popover arrow misaligned when class is prefixed (react-bootstrap…
- Loading branch information
Showing
2 changed files
with
43 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
|
||
import ThemeProvider from '../src/ThemeProvider'; | ||
import Overlay from '../src/Overlay'; | ||
import Popover from '../src/Popover'; | ||
|
||
describe('usePopperMarginModifiers', () => { | ||
it('Should set arrow margin to 0px with prefixed popover and dropdown-menu', () => { | ||
const wrapper = mount( | ||
<ThemeProvider prefixes={{ popover: 'prefixed' }}> | ||
<Overlay show> | ||
<Popover id="test-popover" /> | ||
</Overlay> | ||
</ThemeProvider>, | ||
); | ||
|
||
const margin = wrapper.find('.arrow').getDOMNode().style.margin; | ||
assert.equal(margin, '0px'); | ||
}); | ||
}); |