add tests for flexWrap

This commit is contained in:
Christopher Chedeau
2014-12-11 13:57:03 +00:00
parent e0bcbdcfc1
commit ef73ebd935
2 changed files with 19 additions and 2 deletions

View File

@@ -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)}},