This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "code": "aa", "name": "Afar" }, | |
{ "code": "ab", "name": "Abkhazian" }, | |
{ "code": "ae", "name": "Avestan" }, | |
{ "code": "af", "name": "Afrikaans" }, | |
{ "code": "ak", "name": "Akan" }, | |
{ "code": "am", "name": "Amharic" }, | |
{ "code": "an", "name": "Aragonese" }, | |
{ "code": "ar", "name": "Arabic" }, | |
{ "code": "as", "name": "Assamese" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TabNavigator } from 'react-navigation' | |
import Ionicons from 'react-native-vector-icons/Ionicons' | |
import { hook } from 'cavy' | |
class Icon extends Component { | |
render() { | |
const { navigation, generateTestHook, routeName... } = this.props | |
return <Ionicons ref={generateTestHook(`Navigation.${routeName}`)} onPress={() => navigation.navigate(routeName)} .../> | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState, useRef } from 'react'; | |
import { | |
Dimensions, SafeAreaView, | |
ScrollView, | |
StatusBar, StyleSheet, useColorScheme, Animated, | |
LayoutAnimation, | |
View | |
} from 'react-native'; | |
import { LineChart, ProgressChart } from 'react-native-chart-kit'; | |
import { Colors } from 'react-native/Libraries/NewAppScreen'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// follow the 💖 for important parts | |
const {createWriteStream} = require('fs'); | |
// you need to install this lib: globally or locally | |
var TJO = require('translate-json-object')(); | |
// 💖 feel free to use any other JSON file | |
var json_SOURCE_OF_TRUTH = require('../src/localization/translations/en.json'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {Dimensions, StyleSheet, TouchableOpacity, View} from 'react-native'; | |
import {RNCamera} from 'react-native-camera'; | |
import {launchImageLibrary} from 'react-native-image-picker'; | |
import {QRreader} from 'react-native-qr-decode-image-camera'; | |
import QRCodeScanner from 'react-native-qrcode-scanner'; | |
import Ionicon from 'react-native-vector-icons/Ionicons'; | |
export default class CameraScaningScreen extends Component { | |
scanner; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {TestScope} from 'cavy'; | |
export default function (scope: TestScope) { | |
// 🚀 | |
const screen = (await scope.findComponent('CameraScanningScreen')) as any; | |
await scope.pause(1000); | |
// 🚀 now you can call the method directly | |
screen.onSuccessScan({data: "vaccCY2x..."}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useCavy, wrap} from 'cavy'; | |
import React from 'react'; | |
export function testable<P>( | |
FunctionalComponent: React.FunctionComponent<P>, | |
): React.FunctionComponent<P & {testID?: string}> { | |
// if (!__DEV__) { | |
// return FunctionalComponent; | |
// } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"e2e:ios": "cavy run-ios", | |
"e2e:android": "cavy run-android --verbose --xml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Firebase Config using base64 | |
echo "Injecting secrets..." | |
echo "Updating Google JSON" | |
echo $GoogleServicesJson | base64 --decode >"$APPCENTER_SOURCE_DIRECTORY/android/app/google-services.json" | |
echo "Updating Google plist" | |
echo $GoogleServicesPlist | base64 --decode >"$APPCENTER_SOURCE_DIRECTORY/ios/GoogleService-Info.plist" | |
echo "Finished injecting secrets..." | |
echo "Google Services" | |
cat "$APPCENTER_SOURCE_DIRECTORY/ios/GoogleService-Info.plist" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z ${RUN_E2E_TESTS+x} ]; then | |
echo "E2E are not turned on for this build." | |
exit 0 // calling exit with 0 will skip further execution of script | |
// also, exit 1 is similar to exception | |
fi |