diff --git a/test/specs/modules/Popup/Popup-test.js b/test/specs/modules/Popup/Popup-test.js index 08eb220cc5..d793e48964 100644 --- a/test/specs/modules/Popup/Popup-test.js +++ b/test/specs/modules/Popup/Popup-test.js @@ -127,6 +127,21 @@ describe('Popup', () => { expect(bottom).to.be.at.most(document.documentElement.clientHeight) expect(right).to.be.at.most(document.documentElement.clientWidth) }) + it('is the original if no position fits within the viewport', () => { + wrapperMount( + foo} + on='click' + offset={999} + /> + ) + wrapper.find('button').simulate('click') + const selectedPosition = wrapper.state('position') + + expect(selectedPosition).to.equal(position) + }) }) })