diff --git a/src/__tests__/Layout-random-test.js b/src/__tests__/Layout-random-test.js index b1e6bfbf..c6f8a4e6 100644 --- a/src/__tests__/Layout-random-test.js +++ b/src/__tests__/Layout-random-test.js @@ -71,7 +71,8 @@ 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, 'measure', [text(texts.small), text(texts.big)]); + //randEnum(node, 0.5, 'flexWrap', ['nowrap', 'wrap']); + //randEnum(node, 0.5, 'measure', [text(texts.small), text(texts.big)]); if (node.style.measure) { // align-items: stretch on a text node makes it wrap in a different way. diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index 58020b8b..064c6c45 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -1044,7 +1044,7 @@ describe('Layout', function() { ); }); - it('should calcluate left properly with position: absolute right, width, and no parent dimensions', function() { + it('should calculate left properly with position: absolute right, width, and no parent dimensions', function() { testLayout( {style: {}, children: [ {style: {width: 10, position: 'absolute', right: 0}} @@ -1055,6 +1055,22 @@ describe('Layout', function() { ); }); + xit('should layout flex-wrap', function() { + testLayout( + {style: {flexWrap: 'wrap', flexDirection: 'row', width: 100}, children: [ + {style: {width: 40, height: 10}}, + {style: {width: 40, height: 10}}, + {style: {flex: 1}}, + {style: {width: 40, height: 10}}, + ]}, + {width: 100, height: 20, top: 0, left: 0, children: [ + {width: 40, height: 10, top: 0, left: 0}, + {width: 40, height: 10, top: 0, left: 40}, + {width: 40, height: 10, top: 10, left: 0} + ]} + ); + }); + xit('should layout text with alignItems: stretch', function() { testLayout( {style: {width: 80, padding: 7, alignItems: 'stretch', measure: text(texts.big)}},