Maestro Setup for app (#407)

Implementing Maestro tests against onboarding process
This commit is contained in:
Ritesh Shukla
2025-06-05 02:14:52 +05:30
committed by GitHub
parent 1c069fe0bd
commit ecbbabcf4d
15 changed files with 273 additions and 8 deletions
@@ -16,6 +16,7 @@ import { useSettingsContext } from '../../../providers/Settings'
import Icon from '../../Global/components/icon'
import { PublicSystemInfo } from '@jellyfin/sdk/lib/generated-client/models'
import { connectToServer } from '../../../api/mutations/login'
import { IS_MAESTRO_BUILD } from '../../../configs/config'
export default function ServerAddress({
navigation,
@@ -126,6 +127,7 @@ export default function ServerAddress({
onChangeText={setServerAddress}
autoCapitalize='none'
autoCorrect={false}
secureTextEntry={IS_MAESTRO_BUILD} // If Maestro build, don't show the server address as screen Records
flex={1}
placeholder='jellyfin.org'
testID='server_address_input'
@@ -13,6 +13,7 @@ import Icon from '../../Global/components/icon'
import { useJellifyContext } from '../../../providers'
import { NativeStackNavigationProp } from '@react-navigation/native-stack'
import Toast from 'react-native-toast-message'
import { IS_MAESTRO_BUILD } from '../../../configs/config'
export default function ServerAuthentication({
navigation,
@@ -78,7 +79,11 @@ export default function ServerAuthentication({
prependElement={<Icon name='human-greeting-variant' color={'$borderColor'} />}
placeholder='Username'
value={username}
style={
IS_MAESTRO_BUILD ? { backgroundColor: '#000', color: '#000' } : undefined
}
testID='username_input'
secureTextEntry={IS_MAESTRO_BUILD} // If Maestro build, don't show the username as screen Records
onChangeText={(value: string | undefined) => setUsername(value)}
autoCapitalize='none'
autoCorrect={false}
@@ -90,10 +95,14 @@ export default function ServerAuthentication({
prependElement={<Icon name='lock-outline' color={'$borderColor'} />}
placeholder='Password'
value={password}
testID='password_input'
style={
IS_MAESTRO_BUILD ? { backgroundColor: '#000', color: '#000' } : undefined
}
onChangeText={(value: string | undefined) => setPassword(value)}
autoCapitalize='none'
autoCorrect={false}
secureTextEntry
secureTextEntry={IS_MAESTRO_BUILD} // If Maestro build, don't show the password as screen Records
/>
<Spacer />
+3 -1
View File
@@ -12,6 +12,7 @@ import {
import Animated, { useSharedValue, useAnimatedStyle, withTiming } from 'react-native-reanimated'
import hotUpdate from 'react-native-ota-hot-update'
import DeviceInfo from 'react-native-device-info'
import { OTA_UPDATE_ENABLED } from '../../configs/config'
const version = DeviceInfo.getVersion()
@@ -72,7 +73,8 @@ const GitUpdateModal = () => {
}
useEffect(() => {
if (__DEV__) {
console.log('OTA_UPDATE_ENABLED', OTA_UPDATE_ENABLED)
if (__DEV__ || !OTA_UPDATE_ENABLED) {
return
}
onCheckGitVersion()
+6
View File
@@ -0,0 +1,6 @@
import Config from 'react-native-config'
const OTA_UPDATE_ENABLED = Config.OTA_UPDATE_ENABLED === 'true'
const IS_MAESTRO_BUILD = Config.IS_MAESTRO_BUILD === 'true'
export { OTA_UPDATE_ENABLED, IS_MAESTRO_BUILD }
+9
View File
@@ -0,0 +1,9 @@
declare module 'react-native-config' {
export interface NativeConfig {
OTA_UPDATE_ENABLED?: string
IS_MAESTRO_BUILD?: string
}
export const Config: NativeConfig
export default Config
}