add a few test ids
This commit is contained in:
@@ -167,7 +167,8 @@ function CreateAnother() {
|
|||||||
color="secondary"
|
color="secondary"
|
||||||
size="small"
|
size="small"
|
||||||
style={[a.self_center]}
|
style={[a.self_center]}
|
||||||
onPress={() => navigation.navigate('StarterPackWizard')}>
|
onPress={() => navigation.navigate('StarterPackWizard')}
|
||||||
|
testID="createAnotherStarterpackBtn">
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Create another</Trans>
|
<Trans>Create another</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
@@ -247,7 +248,8 @@ function Empty() {
|
|||||||
size="small"
|
size="small"
|
||||||
disabled={isGenerating}
|
disabled={isGenerating}
|
||||||
onPress={confirmDialogControl.open}
|
onPress={confirmDialogControl.open}
|
||||||
style={{backgroundColor: 'transparent'}}>
|
style={{backgroundColor: 'transparent'}}
|
||||||
|
testID="createStarterpackForMeBtn">
|
||||||
<ButtonText style={{color: 'white'}}>
|
<ButtonText style={{color: 'white'}}>
|
||||||
<Trans>Make one for me</Trans>
|
<Trans>Make one for me</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
@@ -265,7 +267,8 @@ function Empty() {
|
|||||||
borderColor: 'white',
|
borderColor: 'white',
|
||||||
width: 100,
|
width: 100,
|
||||||
}}
|
}}
|
||||||
hoverStyle={[{backgroundColor: '#dfdfdf'}]}>
|
hoverStyle={[{backgroundColor: '#dfdfdf'}]}
|
||||||
|
testID="createStarterpackBtn">
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Create</Trans>
|
<Trans>Create</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
|
|||||||
export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV
|
export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV
|
||||||
export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
||||||
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
||||||
|
export const IS_E2E = process.env.EXPO_PUBLIC_ENV === 'e2e'
|
||||||
|
|
||||||
// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
|
// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
|
||||||
// along with the other version info. Useful for debugging/reporting.
|
// along with the other version info. Useful for debugging/reporting.
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export function StepDetails() {
|
|||||||
)}
|
)}
|
||||||
value={state.name}
|
value={state.name}
|
||||||
onChangeText={text => dispatch({type: 'SetName', name: text})}
|
onChangeText={text => dispatch({type: 'SetName', name: text})}
|
||||||
|
testID="starterPackName"
|
||||||
/>
|
/>
|
||||||
<TextField.SuffixText label={_(`${state.name?.length} out of 50`)}>
|
<TextField.SuffixText label={_(`${state.name?.length} out of 50`)}>
|
||||||
<Text style={[t.atoms.text_contrast_medium]}>
|
<Text style={[t.atoms.text_contrast_medium]}>
|
||||||
@@ -75,6 +76,7 @@ export function StepDetails() {
|
|||||||
}
|
}
|
||||||
multiline
|
multiline
|
||||||
style={{minHeight: 150}}
|
style={{minHeight: 150}}
|
||||||
|
testID="starterPackDescription"
|
||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {useFocusEffect, useNavigation} from '@react-navigation/native'
|
|||||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
|
import {IS_E2E} from 'lib/app-info'
|
||||||
import {HITSLOP_10} from 'lib/constants'
|
import {HITSLOP_10} from 'lib/constants'
|
||||||
import {createSanitizedDisplayName} from 'lib/moderation/create-sanitized-display-name'
|
import {createSanitizedDisplayName} from 'lib/moderation/create-sanitized-display-name'
|
||||||
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
||||||
@@ -58,6 +59,8 @@ import {WizardEditListDialog} from '#/components/StarterPack/Wizard/WizardEditLi
|
|||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {Provider} from './State'
|
import {Provider} from './State'
|
||||||
|
|
||||||
|
const MIN_PROFILES = IS_E2E ? 2 : 8
|
||||||
|
|
||||||
export function Wizard({
|
export function Wizard({
|
||||||
route,
|
route,
|
||||||
}: NativeStackScreenProps<
|
}: NativeStackScreenProps<
|
||||||
@@ -399,7 +402,7 @@ function Footer({
|
|||||||
(state.currentStep === 'Profiles' && items.length > 1) ||
|
(state.currentStep === 'Profiles' && items.length > 1) ||
|
||||||
(state.currentStep === 'Feeds' && items.length > 0)
|
(state.currentStep === 'Feeds' && items.length > 0)
|
||||||
|
|
||||||
const minimumItems = state.currentStep === 'Profiles' ? 8 : 0
|
const minimumItems = state.currentStep === 'Profiles' ? MIN_PROFILES : 0
|
||||||
|
|
||||||
const textStyles = [a.text_md]
|
const textStyles = [a.text_md]
|
||||||
|
|
||||||
@@ -528,11 +531,11 @@ function Footer({
|
|||||||
) : (
|
) : (
|
||||||
<View style={{width: 70, height: 35}} />
|
<View style={{width: 70, height: 35}} />
|
||||||
)}
|
)}
|
||||||
{state.currentStep === 'Profiles' && items.length < 8 ? (
|
{state.currentStep === 'Profiles' && items.length < MIN_PROFILES ? (
|
||||||
<>
|
<>
|
||||||
<Text
|
<Text
|
||||||
style={[a.font_bold, textStyles, t.atoms.text_contrast_medium]}>
|
style={[a.font_bold, textStyles, t.atoms.text_contrast_medium]}>
|
||||||
<Trans>Add {8 - items.length} more to continue</Trans>
|
<Trans>Add {MIN_PROFILES - items.length} more to continue</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<View style={{width: 70}} />
|
<View style={{width: 70}} />
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {useAgent, useSession} from '#/state/session'
|
|||||||
import {useSetDrawerSwipeDisabled, useSetMinimalShellMode} from '#/state/shell'
|
import {useSetDrawerSwipeDisabled, useSetMinimalShellMode} from '#/state/shell'
|
||||||
import {useComposerControls} from '#/state/shell/composer'
|
import {useComposerControls} from '#/state/shell/composer'
|
||||||
import {useAnalytics} from 'lib/analytics/analytics'
|
import {useAnalytics} from 'lib/analytics/analytics'
|
||||||
import {IS_DEV, IS_TESTFLIGHT} from 'lib/app-info'
|
import {IS_DEV, IS_E2E, IS_TESTFLIGHT} from 'lib/app-info'
|
||||||
import {useSetTitle} from 'lib/hooks/useSetTitle'
|
import {useSetTitle} from 'lib/hooks/useSetTitle'
|
||||||
import {ComposeIcon2} from 'lib/icons'
|
import {ComposeIcon2} from 'lib/icons'
|
||||||
import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
|
import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
|
||||||
@@ -172,7 +172,10 @@ function ProfileScreenLoaded({
|
|||||||
const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
|
const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
|
||||||
const gate = useGate()
|
const gate = useGate()
|
||||||
const starterPacksEnabled =
|
const starterPacksEnabled =
|
||||||
IS_DEV || IS_TESTFLIGHT || (!isWeb && gate('starter_packs_enabled'))
|
IS_DEV ||
|
||||||
|
IS_TESTFLIGHT ||
|
||||||
|
IS_E2E ||
|
||||||
|
(!isWeb && gate('starter_packs_enabled'))
|
||||||
|
|
||||||
const [scrollViewTag, setScrollViewTag] = React.useState<number | null>(null)
|
const [scrollViewTag, setScrollViewTag] = React.useState<number | null>(null)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user