Fix crash on overlayColor usage (#20929)

Summary:
see snack for demo on the issue: https://snack.expo.io/jyrno42/overlaycolor-issue-snack
Pull Request resolved: https://github.com/facebook/react-native/pull/20929

Differential Revision: D9727250

Pulled By: hramos

fbshipit-source-id: 03c95d4b5a38ae51ecebb8615fda1af9599c0508
This commit is contained in:
Jyrno Ader
2018-09-07 14:12:30 -07:00
committed by Facebook Github Bot
parent fe4f03517c
commit 6bc483c8cc
4 changed files with 61 additions and 1 deletions
@@ -0,0 +1,27 @@
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.tests;
import android.view.View;
import com.facebook.react.testing.ReactAppInstrumentationTestCase;
/**
* Simple test case for passing overlayColor prop to the Image component
*/
public class ImageOverlayColorTestCase extends ReactAppInstrumentationTestCase {
@Override
protected String getReactApplicationKeyUnderTest() {
return "ImageOverlayColorTestApp";
}
public void testOverlayColorDoesNotCrash() {
View image = getViewByTestId("image");
assertNotNull(image);
}
}