2.1.0 • Published 11 months ago

react-native-is-maestro v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

react-native-is-maestro

This React Native library provides a way to detect synchronously if the app is currently running in an E2E test environment with Maestro. It can be useful for disabling certain functionality or UI elements that may interfere with the test. To use the library, simply import it and call the isMaestro() function.

Installation

npm install react-native-is-maestro
yarn add react-native-is-maestro

Auto-linking

cd ios && pod install

Expo

Works out of the box without any addition config

Usage

import React from 'react'
import { StyleSheet, View, Text } from 'react-native'
import { isMaestro } from 'react-native-is-maestro'

export const App = () => (
    <View style={styles.container}>
        <Text>
            isMaestro detected: {isMaestro() ? 'yes' : 'no'}
        </Text>
    </View>
)

const styles = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center'
    }
})

Supported versions

This library is fully compatible with TypeScript and can be used on both iOS and Android platforms. It also supports both old (Paper) and new architecture (Fabric) of React Native.

Lib versionRN versionMaestro CLI
1.0>= 0.71>= 1.19
2.00.71, 0.72>= 1.22.1

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

2.1.0

11 months ago

2.0.0

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago