Update home-screen tests related to feeds
This commit is contained in:
parent
34759798eb
commit
3fbac466ac
5 changed files with 27 additions and 4 deletions
|
@ -108,6 +108,7 @@ export const PagerWithHeader = React.forwardRef<PagerRef, PagerWithHeaderProps>(
|
|||
pointerEvents: isHeaderReady ? 'auto' : 'none',
|
||||
}}>
|
||||
<TabBar
|
||||
testID={testID}
|
||||
items={items}
|
||||
selectedPage={currentPage}
|
||||
onSelect={props.onSelect}
|
||||
|
@ -127,6 +128,7 @@ export const PagerWithHeader = React.forwardRef<PagerRef, PagerWithHeaderProps>(
|
|||
isMobile,
|
||||
onTabBarLayout,
|
||||
onHeaderOnlyLayout,
|
||||
testID,
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ export function TabBar({
|
|||
return (
|
||||
<View testID={testID} style={[pal.view, styles.outer]}>
|
||||
<DraggableScrollView
|
||||
testID={`${testID}-selector`}
|
||||
horizontal={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
ref={scrollElRef}
|
||||
|
@ -76,6 +77,7 @@ export function TabBar({
|
|||
const selected = i === selectedPage
|
||||
return (
|
||||
<PressableWithHover
|
||||
testID={`${testID}-selector-${i}`}
|
||||
key={item}
|
||||
onLayout={e => onItemLayout(e, i)}
|
||||
style={[styles.item, selected && indicatorStyle]}
|
||||
|
|
|
@ -267,6 +267,7 @@ function ProfileScreenLoaded({
|
|||
screenDescription="profile"
|
||||
moderation={moderation.account}>
|
||||
<PagerWithHeader
|
||||
testID="profilePager"
|
||||
isHeaderReady={true}
|
||||
items={sectionTitles}
|
||||
onPageSelected={onPageSelected}
|
||||
|
|
|
@ -353,6 +353,7 @@ export function ProfileFeedScreenInner({
|
|||
style={styles.btn}
|
||||
/>
|
||||
<Button
|
||||
testID={isPinned ? 'unpinBtn' : 'pinBtn'}
|
||||
disabled={isPinPending || isUnpinPending}
|
||||
type={isPinned ? 'default' : 'inverted'}
|
||||
label={isPinned ? 'Unpin' : 'Pin to home'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue