Fix curate-lists tests

This commit is contained in:
Eric Bailey
2023-12-04 16:32:08 -06:00
parent e2041d0372
commit a7301a2ac6
6 changed files with 21 additions and 12 deletions
+1
View File
@@ -61,6 +61,7 @@ export interface CreateOrEditListModal {
export interface UserAddRemoveListsModal {
name: 'user-add-remove-lists'
subject: string
handle: string
displayName: string
onAdd?: (listUri: string) => void
onRemove?: (listUri: string) => void
+1
View File
@@ -132,6 +132,7 @@ export function ListMembers({
name: 'user-add-remove-lists',
subject: profile.did,
displayName: profile.displayName || profile.handle,
handle: profile.handle,
})
},
[openModal],
+6 -1
View File
@@ -28,11 +28,13 @@ export const snapPoints = ['fullscreen']
export function Component({
subject,
handle,
displayName,
onAdd,
onRemove,
}: {
subject: string
handle: string
displayName: string
onAdd?: (listUri: string) => void
onRemove?: (listUri: string) => void
@@ -60,6 +62,7 @@ export function Component({
list={list}
memberships={memberships}
subject={subject}
handle={handle}
onAdd={onAdd}
onRemove={onRemove}
/>
@@ -87,6 +90,7 @@ function ListItem({
list,
memberships,
subject,
handle,
onAdd,
onRemove,
}: {
@@ -94,6 +98,7 @@ function ListItem({
list: GraphDefs.ListView
memberships: ListMembersip[] | undefined
subject: string
handle: string
onAdd?: (listUri: string) => void
onRemove?: (listUri: string) => void
}) {
@@ -182,7 +187,7 @@ function ListItem({
<ActivityIndicator />
) : (
<Button
testID={`user-${subject}-addBtn`}
testID={`user-${handle}-addBtn`}
type="default"
label={membership === false ? _(msg`Add`) : _(msg`Remove`)}
onPress={onToggleMembership}
+1
View File
@@ -217,6 +217,7 @@ let ProfileHeaderLoaded = ({
openModal({
name: 'user-add-remove-lists',
subject: profile.did,
handle: profile.handle,
displayName: profile.displayName || profile.handle,
onAdd: invalidateProfileQuery,
onRemove: invalidateProfileQuery,
+1
View File
@@ -42,6 +42,7 @@ export function SearchResultCard({
return (
<Link
testID={`searchAutoCompleteResult-${profile.handle}`}
href={makeProfileLink(profile)}
title={profile.handle}
asAnchor