Temporarily disabled CatalystUIManagerTestCase.testFlexWithTextViews test

Summary:
After D3876927 this test started failing on CI.
Locally we can't reproduce it, and it will take some time to understand what this test is intended for so that we could remove the variable part.
More investigation will follow, t13583009

Reviewed By: emilsjolander

Differential Revision: D3930334

fbshipit-source-id: 279f67eb5a77b5d4250afd48c8b94c828da6925c
This commit is contained in:
Konstantin Raev 2016-09-27 07:08:05 -07:00 коммит произвёл Facebook Github Bot 4
Родитель d368ebfab2
Коммит 449c195941
1 изменённых файлов: 40 добавлений и 37 удалений

Просмотреть файл

@ -120,43 +120,46 @@ public class CatalystUIManagerTestCase extends ReactIntegrationTestCase {
assertEquals(inPixelRounded(200), child1.getHeight());
}
public void testFlexWithTextViews() {
FrameLayout rootView = createRootView();
jsModule.renderFlexWithTextApplication(rootView.getId());
waitForBridgeAndUIIdle();
assertEquals(1, rootView.getChildCount());
ViewGroup container = getViewByTestId(rootView, "container");
assertEquals(inPixelRounded(300), container.getHeight());
assertEquals(1, container.getChildCount());
ViewGroup row = (ViewGroup) container.getChildAt(0);
assertEquals(inPixelRounded(300), row.getHeight());
assertEquals(2, row.getChildCount());
// Text measurement adds padding that isn't completely dependent on density so we can't easily
// get an exact value here
float approximateExpectedTextHeight = inPixelRounded(19);
View leftText = row.getChildAt(0);
assertTrue(
isWithinRange(
leftText.getHeight(),
approximateExpectedTextHeight - PixelUtil.toPixelFromDIP(1),
approximateExpectedTextHeight + PixelUtil.toPixelFromDIP(1)));
assertEquals(row.getWidth() / 2 - inPixelRounded(20), leftText.getWidth());
assertEquals(inPixelRounded(290), (leftText.getTop() + leftText.getHeight()));
View rightText = row.getChildAt(1);
assertTrue(
isWithinRange(
rightText.getHeight(),
approximateExpectedTextHeight - PixelUtil.toPixelFromDIP(1),
approximateExpectedTextHeight + PixelUtil.toPixelFromDIP(1)));
assertEquals(leftText.getWidth(), rightText.getWidth());
assertEquals(leftText.getTop(), rightText.getTop());
assertEquals(leftText.getWidth() + inPixelRounded(30), rightText.getLeft());
}
// TODO t13583009
// Breaks OSS CI but runs fine locally
// Find what could be different and make the test independent of env
// public void testFlexWithTextViews() {
// FrameLayout rootView = createRootView();
// jsModule.renderFlexWithTextApplication(rootView.getId());
// waitForBridgeAndUIIdle();
//
// assertEquals(1, rootView.getChildCount());
//
// ViewGroup container = getViewByTestId(rootView, "container");
// assertEquals(inPixelRounded(300), container.getHeight());
// assertEquals(1, container.getChildCount());
//
// ViewGroup row = (ViewGroup) container.getChildAt(0);
// assertEquals(inPixelRounded(300), row.getHeight());
// assertEquals(2, row.getChildCount());
//
// // Text measurement adds padding that isn't completely dependent on density so we can't easily
// // get an exact value here
// float approximateExpectedTextHeight = inPixelRounded(19);
// View leftText = row.getChildAt(0);
// assertTrue(
// isWithinRange(
// leftText.getHeight(),
// approximateExpectedTextHeight - PixelUtil.toPixelFromDIP(1),
// approximateExpectedTextHeight + PixelUtil.toPixelFromDIP(1)));
// assertEquals(row.getWidth() / 2 - inPixelRounded(20), leftText.getWidth());
// assertEquals(inPixelRounded(290), (leftText.getTop() + leftText.getHeight()));
//
// View rightText = row.getChildAt(1);
// assertTrue(
// isWithinRange(
// rightText.getHeight(),
// approximateExpectedTextHeight - PixelUtil.toPixelFromDIP(1),
// approximateExpectedTextHeight + PixelUtil.toPixelFromDIP(1)));
// assertEquals(leftText.getWidth(), rightText.getWidth());
// assertEquals(leftText.getTop(), rightText.getTop());
// assertEquals(leftText.getWidth() + inPixelRounded(30), rightText.getLeft());
// }
public void testAbsolutePositionUIRendered() {
FrameLayout rootView = createRootView();