"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.testProps = void 0;
var react_native_1 = require("react-native");
// Please read http://93days.me/testing-react-native-application/ to understand why we set accessibilityLabel here.
/**
 * The underlying Android test drivers use accessibilityLabel to find elements. However, all other platforms use testID.
 * Because of this, we're adding the testProps function that takes in a unique identifier and returns the correct prop based on the platform
 * (testID for Win32, Windows, macOS, iOS; accessibilityId for Android).
 *
 * If explicit accessibilityLabel is being used for other platforms, apply testProps after it to override it for Android.
 * @param id The string to be used as the test identifier
 * @returns an object with the correct test identifier prop based on platform
 */
function testProps(id) {
    return react_native_1.Platform.select({
        android: {
            accessible: true,
            accessibilityLabel: id,
        },
        macos: {
            accessible: true,
            accessibilityLabel: id,
            testID: id,
        },
        default: {
            testID: id,
        },
    });
}
exports.testProps = testProps;
//# sourceMappingURL=TestProps.js.map