add pop id prop to fix integration tests

main
Mike Fix 6 years ago
parent 9d37f9bf99
commit 469890df68

@ -49,7 +49,12 @@ class BackgroundSelect extends React.PureComponent {
<div className="bg-color" /> <div className="bg-color" />
</div> </div>
</div> </div>
<Popout pointerLeft="15px" hidden={!isVisible} style={{ width: '222px' }}> <Popout
id="bg-select-pickers"
pointerLeft="15px"
hidden={!isVisible}
style={{ width: '222px' }}
>
<div className="picker-tabs"> <div className="picker-tabs">
{['color', 'image'].map(tab => ( {['color', 'image'].map(tab => (
<div <div

@ -36,14 +36,14 @@ class Popout extends React.PureComponent {
} }
render() { render() {
const { children, borderColor, style, hidden, pointerLeft, pointerRight } = this.props const { id, children, borderColor, style, hidden, pointerLeft, pointerRight } = this.props
if (hidden) { if (hidden) {
return null return null
} }
return ( return (
<div className="popout" style={style}> <div id={id} className="popout" style={style}>
<WindowPointer fromLeft={pointerLeft} fromRight={pointerRight} color={borderColor} /> <WindowPointer fromLeft={pointerLeft} fromRight={pointerRight} color={borderColor} />
{children} {children}
<style jsx> <style jsx>

@ -8,7 +8,7 @@ import { editorVisible } from '../support'
describe('background color', () => { describe('background color', () => {
const bgColor = '.bg-color-container .bg-color' const bgColor = '.bg-color-container .bg-color'
const picker = '.bg-select-pickers' const picker = '#bg-select-pickers'
const openPicker = () => { const openPicker = () => {
cy.get(bgColor).click() cy.get(bgColor).click()

Loading…
Cancel
Save