Skip to content

Commit

Permalink
Merge pull request #584 from appnexus/582-upgrade-to-react-15
Browse files Browse the repository at this point in the history
Upgrades docs pages to use React 15.3.2
  • Loading branch information
mute authored Oct 19, 2016
2 parents 32fb045 + 6abde86 commit 3ac3854
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@
"node-resemble-js": "0.0.5",
"postcss-loader": "^0.8.1",
"raw-loader": "^0.5.1",
"react": "^0.14.0",
"react-addons-css-transition-group": "^0.14.0",
"react-addons-test-utils": "^0.14.0",
"react-dom": "^0.14.0",
"react": "^15.3.2",
"react-addons-css-transition-group": "^15.3.2",
"react-addons-test-utils": "^15.3.2",
"react-dom": "^15.3.2",
"react-router": "^2.0.0",
"sinon": "^2.0.0-pre",
"style-loader": "^0.13.0",
"webpack": "^1.12.12",
"webpack-dev-server": "^1.14.1"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.2",
"react-dom": "^0.14.0 || ^15.0.2",
"react-addons-css-transition-group": "^0.14.0 || ^15.0.2"
"react": "^15.0.2",
"react-dom": "^15.0.2",
"react-addons-css-transition-group": "^15.0.2"
}
}
6 changes: 3 additions & 3 deletions src/components/DropMenu/DropMenu.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -805,12 +805,12 @@ describe('DropMenu', () => {

const flyOutDOMNode = document.querySelector('.lucid-DropMenu.lucid-ContextMenu-FlyOut .lucid-DropMenu-option-container');
assert.equal(flyOutDOMNode.children.length, 9);
assert.equal(flyOutDOMNode.children[0].firstChild.innerHTML, 'Preferred');
assert.equal(flyOutDOMNode.children[0].innerText, 'Preferred');
assert.equal(flyOutDOMNode.children[1].innerHTML, 'option a');
assert.equal(flyOutDOMNode.children[2].innerHTML, 'option b');
assert.equal(flyOutDOMNode.children[3].innerHTML, 'option c');
assert.equal(flyOutDOMNode.children[4].className, 'lucid-DropMenu-OptionGroup-divider');
assert.equal(flyOutDOMNode.children[5].firstChild.innerHTML, 'Available');
assert.equal(flyOutDOMNode.children[5].innerText, 'Available');
assert.equal(flyOutDOMNode.children[6].innerHTML, 'option x');
assert.equal(flyOutDOMNode.children[7].innerHTML, 'option y');
assert.equal(flyOutDOMNode.children[8].innerHTML, 'option z');
Expand Down Expand Up @@ -842,7 +842,7 @@ describe('DropMenu', () => {

const flyOutDOMNode = document.querySelector('.lucid-DropMenu.lucid-ContextMenu-FlyOut .lucid-DropMenu-option-container');
assert.equal(flyOutDOMNode.children.length, 4);
assert.equal(flyOutDOMNode.children[0].firstChild.innerHTML, 'Available');
assert.equal(flyOutDOMNode.children[0].innerText, 'Available');
assert.equal(flyOutDOMNode.children[1].innerHTML, 'option x');
assert.equal(flyOutDOMNode.children[2].innerHTML, 'option y');
assert.equal(flyOutDOMNode.children[3].innerHTML, 'option z');
Expand Down
12 changes: 9 additions & 3 deletions src/util/component-types.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('component-types', () => {
});

describe('findTypes', () => {
it('should find all elements of the same type from children', () => {
it('should find all elements of the same type from children', (done) => {
const Option = createClass({ propName: 'option' });

const Selector = createClass({
Expand All @@ -193,8 +193,10 @@ describe('component-types', () => {
assert.equal(2, optionElements.length, 'length must be 2');
assert.equal(true, _.get(optionElements[0].props, 'isDisabled'), 'element must have prop `isDisabled`');
assert.equal('Select red', _.get(optionElements[1].props, 'title'), 'element must have prop `title`');
done();
},
});

shallow(
<Selector>
<button />
Expand All @@ -206,7 +208,7 @@ describe('component-types', () => {
);
});

it('should find all elements of the same type from props if type has `propName` defined', () => {
it('should find all elements of the same type from props if type has `propName` defined', (done) => {
const Option = createClass({ propName: ['option', 'options'] });

const Selector = createClass({
Expand All @@ -217,8 +219,10 @@ describe('component-types', () => {
assert.equal('red', _.get(optionElements[0].props, 'children'), 'element children must match prop value');
assert(_.isEqual({ children: 'green', isDisabled: true }, optionElements[1].props), 'element props must match props');
assert.equal('blue', _.get(optionElements[2].props, 'children'), 'element children must match prop value');
done();
},
});

shallow(
<Selector
option='red'
Expand All @@ -230,7 +234,7 @@ describe('component-types', () => {
);
});

it('should find all elements of the same type from props and children', () => {
it('should find all elements of the same type from props and children', (done) => {
const Option = createClass({ propName: ['option', 'options'] });

const Selector = createClass({
Expand All @@ -243,8 +247,10 @@ describe('component-types', () => {
assert.equal('blue', _.get(optionElements[2].props, 'children'), 'element children must match prop value');
assert.equal(true, _.get(optionElements[3].props, 'isDisabled'), 'element must have prop `isDisabled`');
assert.equal('Select red', _.get(optionElements[4].props, 'title'), 'element must have prop `title`');
done();
},
});

shallow(
<Selector
option='red'
Expand Down

0 comments on commit 3ac3854

Please sign in to comment.