@planningcenter/chat-react-native 4.8.0-qa-staging.8 → 4.8.0-qa-staging.10
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/contexts/session_context.d.ts +0 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js.map +1 -1
- package/build/utils/theme.js +20 -21
- package/build/utils/theme.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/contexts/session_context.tsx +19 -39
- package/src/__tests__/hooks/useTheme.tsx +0 -7
- package/src/__tests__/hooks/use_async_storage.test.tsx +1 -87
- package/src/__tests__/hooks/use_attachment_uploader.test.tsx +0 -11
- package/src/__tests__/hooks/use_font_scale.test.ts +0 -25
- package/src/__tests__/utils/cache/page_mutations.ts +3 -68
- package/src/__tests__/utils/client.ts +6 -15
- package/src/__tests__/utils/native_adapters/configuration.ts +15 -50
- package/src/__tests__/utils/parse_simple_markdown.ts +0 -6
- package/src/__tests__/utils/session.ts +0 -11
- package/src/__tests__/utils/theme.ts +0 -17
- package/src/components/conversations/__tests__/conversations.test.tsx +4 -1
- package/src/components/display/__tests__/filter_dropdown.test.tsx +1 -19
- package/src/components/display/__tests__/icon_tile.test.tsx +24 -7
- package/src/components/page/__tests__/component_error_boundary.test.tsx +0 -12
- package/src/contexts/session_context.tsx +0 -1
- package/src/hooks/__tests__/jolt_refresh_throttling.test.tsx +0 -35
- package/src/screens/__tests__/conversation_details_screen.test.tsx +0 -19
- package/src/screens/avatar_picker/__tests__/avatar_picker_state.test.ts +0 -14
- package/src/screens/conversations/__tests__/conversations_screen.test.tsx +0 -6
- package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +0 -8
- package/src/screens/conversations/components/__tests__/search_list_header_component.test.tsx +0 -10
- package/src/screens/search/components/__tests__/search_results_list.test.tsx +1 -0
- package/src/utils/__tests__/attachment_kind.test.ts +0 -4
- package/src/utils/__tests__/convert_attachments_for_create.test.ts +0 -28
- package/src/utils/__tests__/is_input_editable.test.ts +1 -2
- package/src/utils/__tests__/message_text.test.ts +0 -5
- package/src/utils/__tests__/session_manager.test.ts +0 -83
- package/src/utils/__tests__/sha_256.test.ts +0 -34
- package/src/utils/__tests__/uri.test.ts +51 -0
- package/src/utils/theme.ts +20 -21
- package/src/__tests__/event-polyfill.test.ts +0 -313
- package/src/__tests__/index.tsx +0 -5
- package/src/__tests__/jest.ts +0 -11
- package/src/__tests__/utils/uri.ts +0 -65
- package/src/components/display/__tests__/version_footer.test.tsx +0 -48
- package/src/screens/search/components/__tests__/search_blank_states.test.tsx +0 -20
- package/src/utils/__tests__/membership_sync_info_text.test.ts +0 -15
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
2
|
-
import { render } from '@testing-library/react-native'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { buildTestQueryClient } from '../../../__utils__/query_client'
|
|
5
|
-
import { ChatProvider } from '../../../contexts/chat_context'
|
|
6
|
-
import { VersionFooter } from '../version_footer'
|
|
7
|
-
|
|
8
|
-
const { version: packageVersion } = require('../../../../package.json') as { version: string }
|
|
9
|
-
|
|
10
|
-
let queryClient: QueryClient
|
|
11
|
-
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
queryClient = buildTestQueryClient()
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
afterEach(() => {
|
|
17
|
-
queryClient.clear()
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const Wrapper = ({ children }: { children: React.ReactNode }) => (
|
|
21
|
-
<QueryClientProvider client={queryClient}>
|
|
22
|
-
<ChatProvider
|
|
23
|
-
value={{
|
|
24
|
-
token: {
|
|
25
|
-
access_token: '',
|
|
26
|
-
created_at: 0,
|
|
27
|
-
expires_in: 0,
|
|
28
|
-
scope: '',
|
|
29
|
-
refresh_token: '',
|
|
30
|
-
token_type: '',
|
|
31
|
-
},
|
|
32
|
-
onUnauthorizedResponse: () => {},
|
|
33
|
-
theme: { theme: { colors: {} }, colorScheme: 'light' },
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
</ChatProvider>
|
|
38
|
-
</QueryClientProvider>
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
describe('VersionFooter', () => {
|
|
42
|
-
it('shows the published chat-react-native version', () => {
|
|
43
|
-
const { getByText } = render(<VersionFooter />, { wrapper: Wrapper })
|
|
44
|
-
|
|
45
|
-
expect(packageVersion).toMatch(/^\d+\.\d+\.\d+/)
|
|
46
|
-
expect(getByText(`Chat v${packageVersion}`)).toBeTruthy()
|
|
47
|
-
})
|
|
48
|
-
})
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { NoResultsBlankState, SearchPromptBlankState } from '../search_blank_states'
|
|
4
|
-
|
|
5
|
-
describe('SearchPromptBlankState', () => {
|
|
6
|
-
it('renders the prompt heading', () => {
|
|
7
|
-
const view = render(<SearchPromptBlankState />)
|
|
8
|
-
|
|
9
|
-
expect(view.getByText('Search chat')).toBeTruthy()
|
|
10
|
-
})
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
describe('NoResultsBlankState', () => {
|
|
14
|
-
it('renders the heading and the searched term', () => {
|
|
15
|
-
const view = render(<NoResultsBlankState term="budget" />)
|
|
16
|
-
|
|
17
|
-
expect(view.getByText('No results')).toBeTruthy()
|
|
18
|
-
expect(view.getByText(/Nothing matches “budget\.”/)).toBeTruthy()
|
|
19
|
-
})
|
|
20
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { membershipSyncInfoText } from '../membership_sync_info_text'
|
|
2
|
-
|
|
3
|
-
describe('membershipSyncInfoText', () => {
|
|
4
|
-
it('explains membership sync and history visibility for a group', () => {
|
|
5
|
-
expect(membershipSyncInfoText('the group')).toBe(
|
|
6
|
-
'This conversation will stay in sync with the group. Members will automatically be added or removed, and new members will see the history.'
|
|
7
|
-
)
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
it('explains membership sync and history visibility for teams', () => {
|
|
11
|
-
expect(membershipSyncInfoText('the teams')).toBe(
|
|
12
|
-
'This conversation will stay in sync with the teams. Members will automatically be added or removed, and new members will see the history.'
|
|
13
|
-
)
|
|
14
|
-
})
|
|
15
|
-
})
|