@planningcenter/chat-react-native 4.6.0-rc.6 → 4.6.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/display/conversation_avatar.d.ts +3 -1
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +77 -66
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/hooks/use_conversation_avatar_update.d.ts +4 -3
- package/build/hooks/use_conversation_avatar_update.d.ts.map +1 -1
- package/build/hooks/use_conversation_avatar_update.js +146 -48
- package/build/hooks/use_conversation_avatar_update.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +76 -66
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/package.json +2 -2
- package/src/__utils__/render_with_query_client.tsx +13 -0
- package/src/components/conversations/__tests__/conversation_preview.test.tsx +2 -2
- package/src/components/display/__tests__/conversation_avatar.test.tsx +94 -0
- package/src/components/display/conversation_avatar.tsx +9 -2
- package/src/hooks/__tests__/use_conversation_avatar_update.test.tsx +40 -0
- package/src/hooks/use_conversation_avatar_update.ts +67 -11
- package/src/screens/avatar_picker/__tests__/avatar_picker_screen.test.tsx +67 -0
- package/src/screens/avatar_picker/avatar_picker_screen.tsx +7 -1
- package/src/screens/search/__tests__/search_screen.test.tsx +6 -5
- package/src/screens/search/components/__tests__/conversation_results.test.tsx +14 -5
- package/src/screens/search/components/__tests__/message_result_row.test.tsx +5 -4
- package/src/screens/search/components/__tests__/search_results_list.test.tsx +4 -3
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
2
|
-
import { Alert } from 'react-native'
|
|
3
|
-
import type {
|
|
4
|
-
|
|
1
|
+
import { InfiniteData, useMutation, useMutationState, useQueryClient } from '@tanstack/react-query'
|
|
2
|
+
import { Alert, Image } from 'react-native'
|
|
3
|
+
import type {
|
|
4
|
+
ApiCollection,
|
|
5
|
+
ApiResource,
|
|
6
|
+
ConversationAvatarData,
|
|
7
|
+
ConversationResource,
|
|
8
|
+
} from '../types'
|
|
9
|
+
import { updateAllRecordsInPagesData } from '../utils/cache/page_mutations'
|
|
5
10
|
import { transformGetToPost } from '../utils/client/request_helpers'
|
|
6
11
|
import type { ImagePickerAsset } from '../utils/native_adapters/image_picker'
|
|
7
12
|
import { ApiClient, useApiClient } from './use_api_client'
|
|
@@ -16,6 +21,18 @@ export type AvatarUpdatePayload =
|
|
|
16
21
|
| { kind: Extract<AvatarType, 'image'>; imageAsset: ImagePickerAsset; color: string }
|
|
17
22
|
| { kind: 'clear' }
|
|
18
23
|
|
|
24
|
+
const MUTATION_KEY = 'updateConversationAvatar'
|
|
25
|
+
|
|
26
|
+
export const usePendingConversationAvatarUpdate = (conversationId: number | undefined) => {
|
|
27
|
+
const newest = useMutationState({
|
|
28
|
+
filters: { mutationKey: [MUTATION_KEY, conversationId], exact: true },
|
|
29
|
+
select: mutation => mutation.state,
|
|
30
|
+
}).at(-1)
|
|
31
|
+
|
|
32
|
+
if (conversationId === undefined || newest?.status !== 'pending') return undefined
|
|
33
|
+
return newest.variables as AvatarUpdatePayload
|
|
34
|
+
}
|
|
35
|
+
|
|
19
36
|
export const useConversationAvatarUpdate = ({ conversationId }: { conversationId: number }) => {
|
|
20
37
|
const apiClient = useApiClient()
|
|
21
38
|
const uploadClient = useUploadClient()
|
|
@@ -23,11 +40,18 @@ export const useConversationAvatarUpdate = ({ conversationId }: { conversationId
|
|
|
23
40
|
const requestArgs = getConversationRequestArgs({ conversation_id: conversationId })
|
|
24
41
|
const queryKey = getRequestQueryKey(requestArgs)
|
|
25
42
|
|
|
43
|
+
const isSuperseded = (payload: AvatarUpdatePayload) =>
|
|
44
|
+
queryClient
|
|
45
|
+
.getMutationCache()
|
|
46
|
+
.findAll({ mutationKey: [MUTATION_KEY, conversationId], exact: true })
|
|
47
|
+
.at(-1)?.state.variables !== payload
|
|
48
|
+
|
|
26
49
|
return useMutation({
|
|
27
|
-
mutationKey: [
|
|
50
|
+
mutationKey: [MUTATION_KEY, conversationId],
|
|
28
51
|
mutationFn: async (payload: AvatarUpdatePayload) => {
|
|
29
52
|
const postArgs = transformGetToPost(requestArgs).data
|
|
30
53
|
const attributes = await buildAttributes(payload, uploadClient)
|
|
54
|
+
if (isSuperseded(payload)) return null
|
|
31
55
|
|
|
32
56
|
return apiClient.chat.patch<ApiResource<ConversationResource>>({
|
|
33
57
|
url: `/me/conversations/${conversationId}/`,
|
|
@@ -41,16 +65,35 @@ export const useConversationAvatarUpdate = ({ conversationId }: { conversationId
|
|
|
41
65
|
|
|
42
66
|
queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {
|
|
43
67
|
if (!prev?.data) return prev
|
|
44
|
-
return { ...prev, data:
|
|
68
|
+
return { ...prev, data: applyAvatarUpdate(prev.data, payload) }
|
|
45
69
|
})
|
|
46
70
|
|
|
47
71
|
return { previous }
|
|
48
72
|
},
|
|
49
|
-
onSuccess: (response, _payload, _context) => {
|
|
73
|
+
onSuccess: async (response, _payload, _context) => {
|
|
74
|
+
if (!response) return
|
|
75
|
+
|
|
50
76
|
queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, () => response)
|
|
77
|
+
queryClient.setQueriesData<InfiniteData<ApiCollection<ConversationResource>>>(
|
|
78
|
+
{ queryKey: ['/me/conversations'] },
|
|
79
|
+
prev => {
|
|
80
|
+
if (!prev?.pages) return prev
|
|
81
|
+
|
|
82
|
+
return updateAllRecordsInPagesData({
|
|
83
|
+
data: prev,
|
|
84
|
+
processRecord: record =>
|
|
85
|
+
record.id === conversationId ? applySavedAvatar(record, response.data) : record,
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
)
|
|
51
89
|
queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })
|
|
90
|
+
|
|
91
|
+
const imageUrl = response.data.customAvatarImageUrl
|
|
92
|
+
if (imageUrl) await Image.prefetch(imageUrl).catch(() => false)
|
|
52
93
|
},
|
|
53
|
-
onError: (_error,
|
|
94
|
+
onError: (_error, payload, context) => {
|
|
95
|
+
if (isSuperseded(payload)) return
|
|
96
|
+
|
|
54
97
|
if (context?.previous) {
|
|
55
98
|
queryClient.setQueryData(queryKey, context.previous)
|
|
56
99
|
}
|
|
@@ -83,10 +126,23 @@ export async function patchConversationAvatar(
|
|
|
83
126
|
}
|
|
84
127
|
}
|
|
85
128
|
|
|
86
|
-
function
|
|
87
|
-
data:
|
|
129
|
+
function applySavedAvatar<T extends ConversationAvatarData>(
|
|
130
|
+
data: T,
|
|
131
|
+
saved: ConversationAvatarData
|
|
132
|
+
): T {
|
|
133
|
+
return {
|
|
134
|
+
...data,
|
|
135
|
+
customAvatarType: saved.customAvatarType,
|
|
136
|
+
customAvatarKey: saved.customAvatarKey,
|
|
137
|
+
customAvatarColor: saved.customAvatarColor,
|
|
138
|
+
customAvatarImageUrl: saved.customAvatarImageUrl,
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function applyAvatarUpdate<T extends ConversationAvatarData>(
|
|
143
|
+
data: T,
|
|
88
144
|
payload: AvatarUpdatePayload
|
|
89
|
-
):
|
|
145
|
+
): T {
|
|
90
146
|
switch (payload.kind) {
|
|
91
147
|
case 'icon':
|
|
92
148
|
return {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { HeaderHeightContext } from '@react-navigation/elements'
|
|
2
|
+
import { DefaultTheme, ThemeProvider } from '@react-navigation/native'
|
|
3
|
+
import { QueryClientProvider } from '@tanstack/react-query'
|
|
4
|
+
import { render } from '@testing-library/react-native'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
import { Image } from 'react-native'
|
|
7
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context'
|
|
8
|
+
import { buildTestQueryClient } from '../../../__utils__/query_client'
|
|
9
|
+
import type { AvatarUpdatePayload } from '../../../hooks/use_conversation_avatar_update'
|
|
10
|
+
import { AvatarPickerScreen } from '../avatar_picker_screen'
|
|
11
|
+
|
|
12
|
+
jest.mock('@react-navigation/native', () => ({
|
|
13
|
+
...jest.requireActual('@react-navigation/native'),
|
|
14
|
+
useNavigation: () => ({ goBack: jest.fn(), dispatch: jest.fn() }),
|
|
15
|
+
}))
|
|
16
|
+
jest.mock('../../../hooks/use_api_client', () => ({ useApiClient: () => ({}) }))
|
|
17
|
+
jest.mock('../../../hooks/use_upload_client', () => ({ useUploadClient: () => ({}) }))
|
|
18
|
+
jest.mock('../../../hooks/use_conversation', () => ({
|
|
19
|
+
...jest.requireActual('../../../hooks/use_conversation'),
|
|
20
|
+
useConversation: () => ({
|
|
21
|
+
data: { id: 7, customAvatarType: 'icon', customAvatarKey: 'star', customAvatarColor: 'cosmic' },
|
|
22
|
+
}),
|
|
23
|
+
}))
|
|
24
|
+
|
|
25
|
+
const safeAreaMetrics = {
|
|
26
|
+
frame: { x: 0, y: 0, width: 390, height: 844 },
|
|
27
|
+
insets: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
describe('AvatarPickerScreen', () => {
|
|
31
|
+
it('opens on a photo that is still uploading instead of the cached avatar', async () => {
|
|
32
|
+
const queryClient = buildTestQueryClient()
|
|
33
|
+
const photo: AvatarUpdatePayload = {
|
|
34
|
+
kind: 'image',
|
|
35
|
+
color: 'cosmic',
|
|
36
|
+
imageAsset: { uri: 'file:///photo.jpg', width: 100, height: 100 },
|
|
37
|
+
}
|
|
38
|
+
let finishUpload = () => {}
|
|
39
|
+
const uploading = new Promise<void>(resolve => (finishUpload = resolve))
|
|
40
|
+
const upload = queryClient
|
|
41
|
+
.getMutationCache()
|
|
42
|
+
.build(queryClient, {
|
|
43
|
+
mutationKey: ['updateConversationAvatar', 7],
|
|
44
|
+
mutationFn: () => uploading,
|
|
45
|
+
networkMode: 'always',
|
|
46
|
+
})
|
|
47
|
+
.execute(photo)
|
|
48
|
+
|
|
49
|
+
const view = render(
|
|
50
|
+
<SafeAreaProvider initialMetrics={safeAreaMetrics}>
|
|
51
|
+
<ThemeProvider value={DefaultTheme}>
|
|
52
|
+
<HeaderHeightContext.Provider value={0}>
|
|
53
|
+
<QueryClientProvider client={queryClient}>
|
|
54
|
+
<AvatarPickerScreen route={{ params: { conversation_id: 7 } } as never} />
|
|
55
|
+
</QueryClientProvider>
|
|
56
|
+
</HeaderHeightContext.Provider>
|
|
57
|
+
</ThemeProvider>
|
|
58
|
+
</SafeAreaProvider>
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
const sources = view.UNSAFE_getAllByType(Image).map(image => image.props.source)
|
|
62
|
+
expect(sources).toContainEqual({ uri: 'file:///photo.jpg' })
|
|
63
|
+
|
|
64
|
+
finishUpload()
|
|
65
|
+
await upload
|
|
66
|
+
})
|
|
67
|
+
})
|
|
@@ -11,6 +11,7 @@ import { useTheme } from '../../hooks'
|
|
|
11
11
|
import { useConversation } from '../../hooks/use_conversation'
|
|
12
12
|
import {
|
|
13
13
|
useConversationAvatarUpdate,
|
|
14
|
+
usePendingConversationAvatarUpdate,
|
|
14
15
|
type AvatarUpdatePayload,
|
|
15
16
|
} from '../../hooks/use_conversation_avatar_update'
|
|
16
17
|
import { useFontScale } from '../../hooks/use_font_scale'
|
|
@@ -79,9 +80,14 @@ function EditModeContent({ conversationId }: { conversationId: number }) {
|
|
|
79
80
|
const navigation = useNavigation()
|
|
80
81
|
const { data: conversation } = useConversation({ conversation_id: conversationId })
|
|
81
82
|
const mutation = useConversationAvatarUpdate({ conversationId })
|
|
83
|
+
const pendingUpdate = usePendingConversationAvatarUpdate(conversationId)
|
|
82
84
|
const previewDiameter = usePreviewAvatarDiameter()
|
|
83
85
|
|
|
84
|
-
const [state, dispatch] = useReducer(avatarPickerReducer,
|
|
86
|
+
const [state, dispatch] = useReducer(avatarPickerReducer, undefined, () =>
|
|
87
|
+
pendingUpdate
|
|
88
|
+
? initAvatarPickerStateFromPayload(pendingUpdate)
|
|
89
|
+
: initAvatarPickerState(conversation)
|
|
90
|
+
)
|
|
85
91
|
|
|
86
92
|
const hasAvatar = state.selectedType !== null
|
|
87
93
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { act, fireEvent
|
|
1
|
+
import { act, fireEvent } from '@testing-library/react-native'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { Keyboard, ScrollView } from 'react-native'
|
|
4
|
+
import { renderWithQueryClient } from '../../../__utils__/render_with_query_client'
|
|
4
5
|
import type { useSearchResults } from '../../../hooks/use_search_results'
|
|
5
6
|
import type {
|
|
6
7
|
ConversationSearchResultResource,
|
|
@@ -71,7 +72,7 @@ const renderWithResults = () => {
|
|
|
71
72
|
hasNextPage: false,
|
|
72
73
|
isFetchingNextPage: false,
|
|
73
74
|
})
|
|
74
|
-
const view =
|
|
75
|
+
const view = renderWithQueryClient(<SearchScreen />)
|
|
75
76
|
const input = view.getByLabelText(inputLabel)
|
|
76
77
|
fireEvent.changeText(input, 'bud')
|
|
77
78
|
fireEvent.changeText(input, 'budget')
|
|
@@ -99,7 +100,7 @@ afterEach(() => jest.useRealTimers())
|
|
|
99
100
|
|
|
100
101
|
describe('SearchScreen', () => {
|
|
101
102
|
it('searches once with the trimmed term after typing settles', () => {
|
|
102
|
-
const view =
|
|
103
|
+
const view = renderWithQueryClient(<SearchScreen />)
|
|
103
104
|
const input = view.getByLabelText(inputLabel)
|
|
104
105
|
|
|
105
106
|
fireEvent.changeText(input, 'bud')
|
|
@@ -118,7 +119,7 @@ describe('SearchScreen', () => {
|
|
|
118
119
|
})
|
|
119
120
|
|
|
120
121
|
it('lets the prompt scroll while taps still reach the field', () => {
|
|
121
|
-
const view =
|
|
122
|
+
const view = renderWithQueryClient(<SearchScreen />)
|
|
122
123
|
|
|
123
124
|
const scrollView = view.UNSAFE_getByType(ScrollView)
|
|
124
125
|
expect(scrollView.props.keyboardShouldPersistTaps).toBe('handled')
|
|
@@ -127,7 +128,7 @@ describe('SearchScreen', () => {
|
|
|
127
128
|
})
|
|
128
129
|
|
|
129
130
|
it('returns to the prompt as soon as the term is cleared', () => {
|
|
130
|
-
const view =
|
|
131
|
+
const view = renderWithQueryClient(<SearchScreen />)
|
|
131
132
|
const input = view.getByLabelText(inputLabel)
|
|
132
133
|
|
|
133
134
|
fireEvent.changeText(input, 'budget')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { fireEvent
|
|
1
|
+
import { fireEvent } from '@testing-library/react-native'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { renderWithQueryClient } from '../../../../__utils__/render_with_query_client'
|
|
3
4
|
import type { ConversationSearchResultResource } from '../../../../types'
|
|
4
5
|
import { ConversationResults } from '../conversation_results'
|
|
5
6
|
|
|
@@ -14,7 +15,9 @@ const buildResults = (count: number, prefix = 'Conversation') =>
|
|
|
14
15
|
|
|
15
16
|
describe('ConversationResults', () => {
|
|
16
17
|
it('caps at five rows until View more is pressed, then offers View less', () => {
|
|
17
|
-
const view =
|
|
18
|
+
const view = renderWithQueryClient(
|
|
19
|
+
<ConversationResults results={buildResults(6)} onSelect={jest.fn()} />
|
|
20
|
+
)
|
|
18
21
|
|
|
19
22
|
expect(view.getByText('Conversation 5')).toBeTruthy()
|
|
20
23
|
expect(view.queryByText('Conversation 6')).toBeNull()
|
|
@@ -27,14 +30,18 @@ describe('ConversationResults', () => {
|
|
|
27
30
|
})
|
|
28
31
|
|
|
29
32
|
it('renders no footer for five or fewer results', () => {
|
|
30
|
-
const view =
|
|
33
|
+
const view = renderWithQueryClient(
|
|
34
|
+
<ConversationResults results={buildResults(4)} onSelect={jest.fn()} />
|
|
35
|
+
)
|
|
31
36
|
|
|
32
37
|
expect(view.getByText('Conversation 4')).toBeTruthy()
|
|
33
38
|
expect(view.queryByText('View more')).toBeNull()
|
|
34
39
|
})
|
|
35
40
|
|
|
36
41
|
it('stays expanded when the parent re-renders with a new results array', () => {
|
|
37
|
-
const view =
|
|
42
|
+
const view = renderWithQueryClient(
|
|
43
|
+
<ConversationResults results={buildResults(6)} onSelect={jest.fn()} />
|
|
44
|
+
)
|
|
38
45
|
fireEvent.press(view.getByText('View more'))
|
|
39
46
|
|
|
40
47
|
view.rerender(<ConversationResults results={buildResults(6)} onSelect={jest.fn()} />)
|
|
@@ -46,7 +53,9 @@ describe('ConversationResults', () => {
|
|
|
46
53
|
it('passes the pressed result and its position to onSelect', () => {
|
|
47
54
|
const onSelect = jest.fn()
|
|
48
55
|
const results = buildResults(2)
|
|
49
|
-
const view =
|
|
56
|
+
const view = renderWithQueryClient(
|
|
57
|
+
<ConversationResults results={results} onSelect={onSelect} />
|
|
58
|
+
)
|
|
50
59
|
|
|
51
60
|
fireEvent.press(view.getByText('Conversation 2'))
|
|
52
61
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { fireEvent
|
|
1
|
+
import { fireEvent } from '@testing-library/react-native'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { renderWithQueryClient } from '../../../../__utils__/render_with_query_client'
|
|
3
4
|
import type { MessageSearchResultResource } from '../../../../types/resources/search_result'
|
|
4
5
|
import { formatDatePreview } from '../../../../utils/date'
|
|
5
6
|
import { defaultTheme } from '../../../../utils/theme'
|
|
@@ -33,7 +34,7 @@ const interactionColor = defaultTheme('light').colors.interaction
|
|
|
33
34
|
|
|
34
35
|
describe('MessageResultRow', () => {
|
|
35
36
|
it('renders the title, author, snippet, and date', () => {
|
|
36
|
-
const view =
|
|
37
|
+
const view = renderWithQueryClient(<MessageResultRow result={result} onPress={jest.fn()} />)
|
|
37
38
|
|
|
38
39
|
expect(view.getByText('Worship Team')).toBeTruthy()
|
|
39
40
|
expect(view.getByText('Ada Lovelace:', { exact: false })).toBeTruthy()
|
|
@@ -44,7 +45,7 @@ describe('MessageResultRow', () => {
|
|
|
44
45
|
})
|
|
45
46
|
|
|
46
47
|
it('colors matched segments with the interaction color', () => {
|
|
47
|
-
const view =
|
|
48
|
+
const view = renderWithQueryClient(<MessageResultRow result={result} onPress={jest.fn()} />)
|
|
48
49
|
|
|
49
50
|
expect(view.getByText('budget')).toHaveStyle({ color: interactionColor })
|
|
50
51
|
expect(view.getByText('…planning the ')).not.toHaveStyle({ color: interactionColor })
|
|
@@ -53,7 +54,7 @@ describe('MessageResultRow', () => {
|
|
|
53
54
|
it('exposes the row as a button with a composed label and reports presses', () => {
|
|
54
55
|
const onPress = jest.fn()
|
|
55
56
|
const date = formatDatePreview(result.extra.createdAt)
|
|
56
|
-
const view =
|
|
57
|
+
const view = renderWithQueryClient(<MessageResultRow result={result} onPress={onPress} />)
|
|
57
58
|
|
|
58
59
|
const row = view.getByRole('button', {
|
|
59
60
|
name: `Worship Team, Ada Lovelace: …planning the budget meeting for next week, ${date}`,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { fireEvent
|
|
1
|
+
import { fireEvent } from '@testing-library/react-native'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { FlatList } from 'react-native'
|
|
4
|
+
import { renderWithQueryClient } from '../../../../__utils__/render_with_query_client'
|
|
4
5
|
import type { useSearchResults } from '../../../../hooks/use_search_results'
|
|
5
6
|
import type {
|
|
6
7
|
ConversationSearchResultResource,
|
|
@@ -56,7 +57,7 @@ const renderList = (state: Partial<SearchState>, onSettled = jest.fn()) => {
|
|
|
56
57
|
const list = () => (
|
|
57
58
|
<SearchResultsList term="potluck" onSelect={jest.fn()} onSettled={onSettled} {...slots} />
|
|
58
59
|
)
|
|
59
|
-
const view =
|
|
60
|
+
const view = renderWithQueryClient(list())
|
|
60
61
|
const rerenderWith = (next: Partial<SearchState>) => {
|
|
61
62
|
mockUseSearchResults.mockReturnValue(searchState(next))
|
|
62
63
|
view.rerender(list())
|
|
@@ -133,7 +134,7 @@ describe('SearchResultsList', () => {
|
|
|
133
134
|
const onSelect = jest.fn()
|
|
134
135
|
const results = [conversationResult('1'), messageResult('1'), messageResult('2')]
|
|
135
136
|
mockUseSearchResults.mockReturnValue(searchState({ results }))
|
|
136
|
-
const view =
|
|
137
|
+
const view = renderWithQueryClient(
|
|
137
138
|
<SearchResultsList term="potluck" onSelect={onSelect} onSettled={jest.fn()} {...slots} />
|
|
138
139
|
)
|
|
139
140
|
|