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 committed by Facebook Github Bot 4
parent d368ebfab2
commit 449c195941
1 changed files with 40 additions and 37 deletions

View File

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