Skip to content

Instantly share code, notes, and snippets.

Frank Frank1234

  • Stellenbosch, South Africa
Block or report user

Report or block Frank1234

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Frank1234
Frank1234 / EspressoViewFinder.kt
Last active Jul 2, 2018
Helper methods for Espresso and React Native.
View EspressoViewFinder.kt
import android.graphics.Rect
import android.support.test.espresso.Espresso.onView
import android.support.test.espresso.PerformException
import android.support.test.espresso.UiController
import android.support.test.espresso.ViewAction
import android.support.test.espresso.matcher.ViewMatchers.*
import android.support.test.espresso.util.HumanReadables
import android.support.test.espresso.util.TreeIterables
import android.view.View
import android.view.ViewGroup
@Frank1234
Frank1234 / testUtils.js
Last active Jun 29, 2018
Class that can add testIDs on both Android and iOS debug builds
View testUtils.js
import {Platform} from 'react-native';
const getPlatformTestId = (id: string) =>
Platform.OS === 'ios' ? {testID: id} : {accessible: true, accessibilityLabel: id};
/**
* Adds a testID to the views on Android and iOS in their specific ways. On Android,
* this will result in a ContentDescription on Debug builds (and no changes on live builds).
*/
const setTestID = (id : string) =>
@Frank1234
Frank1234 / PieGraph.java
Last active Oct 5, 2017
PieGraph, showing progress on a circle chart.
View PieGraph.java
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
/**
* Shows progress on a circle chart.
You can’t perform that action at this time.