diff --git a/src/__tests__/Layout-random-test.js b/src/__tests__/Layout-random-test.js index 13700482..d8cae15f 100644 --- a/src/__tests__/Layout-random-test.js +++ b/src/__tests__/Layout-random-test.js @@ -71,9 +71,14 @@ describe('Random layout', function() { randEnum(node, 0.5, 'alignItems', ['flex-start', 'center', 'flex-end', 'stretch']); randEnum(node, 0.5, 'alignSelf', ['flex-start', 'center', 'flex-end', 'stretch']); randEnum(node, 0.5, 'position', ['relative', 'absolute']); - //randEnum(node, 0.5, 'flexWrap', ['nowrap', 'wrap']); + randEnum(node, 0.5, 'flexWrap', ['nowrap', 'wrap']); //randEnum(node, 0.5, 'measure', [text(texts.small), text(texts.big)]); + // Chrome is doing some very weird things with this. Probably not worth supporting + if (node.style.flex === 0) { + delete node.style.flex; + } + if (node.style.measure) { // align-items: stretch on a text node makes it wrap in a different way. // We don't yet support this use case diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index a1cd6309..3f8c4533 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -1114,6 +1114,19 @@ describe('Layout', function() { ); }); + // This behavior is very weird. The child has a width of 0 but somehow the + // parent has a width of 500. Looks like a bug rather than a feature. + xit('should layout with flex: 0 and a specific width', function() { + testLayout( + {style: {flexDirection: 'row'}, children: [ + {style: {width: 500, flex: 0}} + ]}, + {width: 500, height: 0, top: 0, left: 0, children: [ + {width: 0, height: 0, top: 0, left: 0} + ]} + ); + }); + xit('should layout with nested padding', function() { testLayout( {style: {}, children: [