react-native-gifted-chat 2.4.1 → 2.6.0

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.
Files changed (159) hide show
  1. package/README.md +34 -14
  2. package/lib/Actions.d.ts +5 -6
  3. package/lib/Actions.js +16 -13
  4. package/lib/Actions.js.map +1 -1
  5. package/lib/Avatar.d.ts +9 -25
  6. package/lib/Avatar.js +12 -18
  7. package/lib/Avatar.js.flow +1 -1
  8. package/lib/Avatar.js.map +1 -1
  9. package/lib/Bubble.d.ts +29 -30
  10. package/lib/Bubble.js +99 -92
  11. package/lib/Bubble.js.flow +2 -2
  12. package/lib/Bubble.js.map +1 -1
  13. package/lib/Composer.d.ts +1 -1
  14. package/lib/Composer.js +30 -32
  15. package/lib/Composer.js.map +1 -1
  16. package/lib/Constant.js +1 -0
  17. package/lib/Constant.js.map +1 -1
  18. package/lib/Day.d.ts +3 -15
  19. package/lib/Day.js +2 -14
  20. package/lib/Day.js.flow +1 -1
  21. package/lib/Day.js.map +1 -1
  22. package/lib/GiftedAvatar.d.ts +7 -7
  23. package/lib/GiftedAvatar.js +30 -29
  24. package/lib/GiftedAvatar.js.map +1 -1
  25. package/lib/GiftedChat.d.ts +15 -89
  26. package/lib/GiftedChat.js +204 -350
  27. package/lib/GiftedChat.js.flow +1 -3
  28. package/lib/GiftedChat.js.map +1 -1
  29. package/lib/GiftedChatContext.d.ts +2 -1
  30. package/lib/GiftedChatContext.js.map +1 -1
  31. package/lib/InputToolbar.d.ts +7 -5
  32. package/lib/InputToolbar.js +41 -34
  33. package/lib/InputToolbar.js.map +1 -1
  34. package/lib/LoadEarlier.d.ts +4 -4
  35. package/lib/LoadEarlier.js +8 -6
  36. package/lib/LoadEarlier.js.map +1 -1
  37. package/lib/Message.d.ts +8 -9
  38. package/lib/Message.js +47 -40
  39. package/lib/Message.js.flow +1 -1
  40. package/lib/Message.js.map +1 -1
  41. package/lib/MessageAudio.d.ts +2 -1
  42. package/lib/MessageAudio.js +4 -4
  43. package/lib/MessageAudio.js.flow +1 -1
  44. package/lib/MessageAudio.js.map +1 -1
  45. package/lib/MessageContainer.d.ts +17 -17
  46. package/lib/MessageContainer.js +33 -51
  47. package/lib/MessageContainer.js.map +1 -1
  48. package/lib/MessageImage.d.ts +5 -4
  49. package/lib/MessageImage.js +4 -5
  50. package/lib/MessageImage.js.flow +1 -1
  51. package/lib/MessageImage.js.map +1 -1
  52. package/lib/MessageText.d.ts +11 -10
  53. package/lib/MessageText.js +5 -10
  54. package/lib/MessageText.js.flow +1 -1
  55. package/lib/MessageText.js.map +1 -1
  56. package/lib/MessageVideo.d.ts +2 -1
  57. package/lib/MessageVideo.js +4 -4
  58. package/lib/MessageVideo.js.flow +1 -1
  59. package/lib/MessageVideo.js.map +1 -1
  60. package/lib/Models.d.ts +7 -7
  61. package/lib/QuickReplies.d.ts +3 -3
  62. package/lib/QuickReplies.js +8 -14
  63. package/lib/QuickReplies.js.flow +1 -1
  64. package/lib/QuickReplies.js.map +1 -1
  65. package/lib/Send.d.ts +4 -4
  66. package/lib/Send.js +6 -9
  67. package/lib/Send.js.map +1 -1
  68. package/lib/SystemMessage.d.ts +6 -5
  69. package/lib/SystemMessage.js +1 -2
  70. package/lib/SystemMessage.js.flow +1 -1
  71. package/lib/SystemMessage.js.map +1 -1
  72. package/lib/Time.d.ts +7 -6
  73. package/lib/Time.js +1 -3
  74. package/lib/Time.js.flow +1 -1
  75. package/lib/Time.js.map +1 -1
  76. package/lib/TypingIndicator.d.ts +2 -1
  77. package/lib/TypingIndicator.js +5 -5
  78. package/lib/TypingIndicator.js.map +1 -1
  79. package/lib/hooks/useUpdateLayoutEffect.js +2 -4
  80. package/lib/hooks/useUpdateLayoutEffect.js.map +1 -1
  81. package/lib/index.d.ts +1 -0
  82. package/lib/index.js +1 -0
  83. package/lib/index.js.map +1 -1
  84. package/lib/logging.d.ts +2 -2
  85. package/lib/logging.js.map +1 -1
  86. package/lib/types.js.flow +1 -1
  87. package/lib/utils.d.ts +1 -1
  88. package/lib/utils.js +2 -4
  89. package/lib/utils.js.map +1 -1
  90. package/package.json +86 -59
  91. package/src/Actions.tsx +114 -0
  92. package/src/Avatar.tsx +178 -0
  93. package/src/Bubble.tsx +596 -0
  94. package/src/Color.ts +17 -0
  95. package/src/Composer.tsx +147 -0
  96. package/src/Constant.ts +18 -0
  97. package/src/Day.tsx +71 -0
  98. package/src/GiftedAvatar.tsx +205 -0
  99. package/src/GiftedChat.tsx +670 -0
  100. package/src/GiftedChatContext.ts +23 -0
  101. package/src/InputToolbar.tsx +113 -0
  102. package/src/LoadEarlier.tsx +108 -0
  103. package/src/Message.tsx +229 -0
  104. package/src/MessageAudio.tsx +19 -0
  105. package/src/MessageContainer.tsx +362 -0
  106. package/src/MessageImage.tsx +78 -0
  107. package/src/MessageText.tsx +187 -0
  108. package/src/MessageVideo.tsx +19 -0
  109. package/src/Models.ts +84 -0
  110. package/src/QuickReplies.tsx +186 -0
  111. package/src/Send.tsx +102 -0
  112. package/src/SystemMessage.tsx +61 -0
  113. package/src/Time.tsx +97 -0
  114. package/src/TypingIndicator.tsx +108 -0
  115. package/src/__tests__/Actions.test.tsx +10 -0
  116. package/src/__tests__/Avatar.test.tsx +13 -0
  117. package/src/__tests__/Bubble.test.tsx +23 -0
  118. package/src/__tests__/Color.test.tsx +5 -0
  119. package/src/__tests__/Composer.test.tsx +11 -0
  120. package/src/__tests__/Constant.test.tsx +5 -0
  121. package/src/__tests__/Day.test.tsx +23 -0
  122. package/src/__tests__/GiftedAvatar.test.tsx +11 -0
  123. package/src/__tests__/GiftedChat.test.tsx +36 -0
  124. package/src/__tests__/InputToolbar.test.tsx +11 -0
  125. package/src/__tests__/LoadEarlier.test.tsx +11 -0
  126. package/src/__tests__/Message.test.tsx +77 -0
  127. package/src/__tests__/MessageContainer.test.tsx +11 -0
  128. package/src/__tests__/MessageImage.test.tsx +27 -0
  129. package/src/__tests__/MessageText.test.tsx +11 -0
  130. package/src/__tests__/Send.test.tsx +22 -0
  131. package/src/__tests__/SystemMessage.test.tsx +27 -0
  132. package/src/__tests__/Time.test.tsx +29 -0
  133. package/src/__tests__/__snapshots__/Actions.test.tsx.snap +76 -0
  134. package/src/__tests__/__snapshots__/Avatar.test.tsx.snap +17 -0
  135. package/src/__tests__/__snapshots__/Bubble.test.tsx.snap +145 -0
  136. package/src/__tests__/__snapshots__/Color.test.tsx.snap +21 -0
  137. package/src/__tests__/__snapshots__/Composer.test.tsx.snap +35 -0
  138. package/src/__tests__/__snapshots__/Constant.test.tsx.snap +16 -0
  139. package/src/__tests__/__snapshots__/Day.test.tsx.snap +37 -0
  140. package/src/__tests__/__snapshots__/GiftedAvatar.test.tsx.snap +22 -0
  141. package/src/__tests__/__snapshots__/GiftedChat.test.tsx.snap +15 -0
  142. package/src/__tests__/__snapshots__/InputToolbar.test.tsx.snap +60 -0
  143. package/src/__tests__/__snapshots__/LoadEarlier.test.tsx.snap +74 -0
  144. package/src/__tests__/__snapshots__/Message.test.tsx.snap +628 -0
  145. package/src/__tests__/__snapshots__/MessageContainer.test.tsx.snap +127 -0
  146. package/src/__tests__/__snapshots__/MessageImage.test.tsx.snap +38 -0
  147. package/src/__tests__/__snapshots__/MessageText.test.tsx.snap +30 -0
  148. package/src/__tests__/__snapshots__/Send.test.tsx.snap +129 -0
  149. package/src/__tests__/__snapshots__/SystemMessage.test.tsx.snap +38 -0
  150. package/src/__tests__/__snapshots__/Time.test.tsx.snap +33 -0
  151. package/src/__tests__/data.ts +8 -0
  152. package/src/__tests__/utils.test.ts +31 -0
  153. package/src/hooks/useUpdateLayoutEffect.ts +21 -0
  154. package/src/index.ts +4 -0
  155. package/src/logging.ts +8 -0
  156. package/src/utils.ts +39 -0
  157. package/.eslintignore +0 -2
  158. package/.eslintrc.js +0 -21
  159. package/jest.config.js +0 -15
@@ -0,0 +1,5 @@
1
+ import * as Constant from '../Constant'
2
+
3
+ it('should compare Constant with snapshot', () => {
4
+ expect(Constant).toMatchSnapshot()
5
+ })
@@ -0,0 +1,23 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { Day } from '../GiftedChat'
6
+ import { DEFAULT_TEST_MESSAGE } from './data'
7
+
8
+ describe('Day', () => {
9
+ it('should not render <Day /> and compare with snapshot', () => {
10
+ const component = renderer.create(<Day />)
11
+ const tree = component.toJSON()
12
+
13
+ expect(tree).toMatchSnapshot()
14
+ })
15
+
16
+ it('should render <Day /> and compare with snapshot', () => {
17
+ const component = renderer.create(
18
+ <Day currentMessage={DEFAULT_TEST_MESSAGE} />
19
+ )
20
+ const tree = component.toJSON()
21
+ expect(tree).toMatchSnapshot()
22
+ })
23
+ })
@@ -0,0 +1,11 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { GiftedAvatar } from '../GiftedChat'
6
+
7
+ it('should render <GiftedAvatar /> and compare with snapshot', () => {
8
+ const tree = renderer.create(<GiftedAvatar />).toJSON()
9
+
10
+ expect(tree).toMatchSnapshot()
11
+ })
@@ -0,0 +1,36 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+ import { SafeAreaProvider } from 'react-native-safe-area-context'
5
+
6
+ import { GiftedChat } from '../GiftedChat'
7
+
8
+ const messages = [
9
+ {
10
+ _id: 1,
11
+ text: 'Hello developer',
12
+ createdAt: new Date(),
13
+ user: {
14
+ _id: 2,
15
+ name: 'React Native',
16
+ },
17
+ },
18
+ ]
19
+
20
+ it('should render <GiftedChat/> and compare with snapshot', () => {
21
+ const tree = renderer
22
+ .create(
23
+ <SafeAreaProvider>
24
+ <GiftedChat
25
+ messages={messages}
26
+ onSend={() => { }}
27
+ user={{
28
+ _id: 1,
29
+ }}
30
+ />
31
+ </SafeAreaProvider>
32
+ )
33
+ .toJSON()
34
+
35
+ expect(tree).toMatchSnapshot()
36
+ })
@@ -0,0 +1,11 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { InputToolbar } from '../GiftedChat'
6
+
7
+ it('should render <InputToolbar /> and compare with snapshot', () => {
8
+ const tree = renderer.create(<InputToolbar />).toJSON()
9
+
10
+ expect(tree).toMatchSnapshot()
11
+ })
@@ -0,0 +1,11 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { LoadEarlier } from '../GiftedChat'
6
+
7
+ it('should render <LoadEarlier /> and compare with snapshot', () => {
8
+ const tree = renderer.create(<LoadEarlier />).toJSON()
9
+
10
+ expect(tree).toMatchSnapshot()
11
+ })
@@ -0,0 +1,77 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { Message } from '../GiftedChat'
6
+
7
+ describe('Message component', () => {
8
+ it('should render <Message /> and compare with snapshot', () => {
9
+ const tree = renderer
10
+ .create(
11
+ <Message
12
+ key='123'
13
+ user={{ _id: 1 }}
14
+ currentMessage={{
15
+ _id: 1,
16
+ text: 'test',
17
+ createdAt: 1554744013721,
18
+ user: { _id: 1 },
19
+ }}
20
+ />
21
+ )
22
+ .toJSON()
23
+
24
+ expect(tree).toMatchSnapshot()
25
+ })
26
+
27
+ it('should NOT render <Message />', () => {
28
+ const tree = renderer
29
+ .create(<Message key='123' user={{ _id: 1 }} currentMessage={null} />)
30
+ .toJSON()
31
+
32
+ expect(tree).toMatchSnapshot()
33
+ })
34
+
35
+ it('should render <Message /> with Avatar', () => {
36
+ const tree = renderer
37
+ .create(
38
+ <Message
39
+ key='123'
40
+ user={{ _id: 1 }}
41
+ currentMessage={{
42
+ _id: 1,
43
+ text: 'test',
44
+ createdAt: 1554744013721,
45
+ user: { _id: 1 },
46
+ }}
47
+ showUserAvatar
48
+ />
49
+ )
50
+ .toJSON()
51
+
52
+ expect(tree).toMatchSnapshot()
53
+ })
54
+
55
+ it('should render null if user has no Avatar', () => {
56
+ const tree = renderer
57
+ .create(
58
+ <Message
59
+ key='123'
60
+ user={{ _id: 1 }}
61
+ currentMessage={{
62
+ _id: 1,
63
+ text: 'test',
64
+ createdAt: 1554744013721,
65
+ user: {
66
+ _id: 1,
67
+ avatar: null,
68
+ },
69
+ }}
70
+ showUserAvatar
71
+ />
72
+ )
73
+ .toJSON()
74
+
75
+ expect(tree).toMatchSnapshot()
76
+ })
77
+ })
@@ -0,0 +1,11 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { MessageContainer } from '../GiftedChat'
6
+
7
+ it('should render <MessageContainer /> and compare with snapshot', () => {
8
+ const tree = renderer.create(<MessageContainer />).toJSON()
9
+
10
+ expect(tree).toMatchSnapshot()
11
+ })
@@ -0,0 +1,27 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { MessageImage } from '../GiftedChat'
6
+ import { DEFAULT_TEST_MESSAGE } from './data'
7
+
8
+ describe('MessageImage', () => {
9
+ it('should not render <MessageImage /> and compare with snapshot', () => {
10
+ const tree = renderer.create(<MessageImage />).toJSON()
11
+ expect(tree).toMatchSnapshot()
12
+ })
13
+
14
+ it('should render <MessageImage /> and compare with snapshot', () => {
15
+ const tree = renderer
16
+ .create(
17
+ <MessageImage
18
+ currentMessage={{
19
+ ...DEFAULT_TEST_MESSAGE,
20
+ image: 'url://to/image.png',
21
+ }}
22
+ />
23
+ )
24
+ .toJSON()
25
+ expect(tree).toMatchSnapshot()
26
+ })
27
+ })
@@ -0,0 +1,11 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { MessageText } from '../GiftedChat'
6
+
7
+ it('should render <MessageText /> and compare with snapshot', () => {
8
+ const tree = renderer.create(<MessageText />).toJSON()
9
+
10
+ expect(tree).toMatchSnapshot()
11
+ })
@@ -0,0 +1,22 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { Send } from '../GiftedChat'
6
+
7
+ describe('Send', () => {
8
+ it('should not render <Send /> and compare with snapshot', () => {
9
+ const tree = renderer.create(<Send />).toJSON()
10
+ expect(tree).toMatchSnapshot()
11
+ })
12
+
13
+ it('should always render <Send /> and compare with snapshot', () => {
14
+ const tree = renderer.create(<Send alwaysShowSend />).toJSON()
15
+ expect(tree).toMatchSnapshot()
16
+ })
17
+
18
+ it('should render <Send /> where there is input and compare with snapshot', () => {
19
+ const tree = renderer.create(<Send text='test input' />).toJSON()
20
+ expect(tree).toMatchSnapshot()
21
+ })
22
+ })
@@ -0,0 +1,27 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { SystemMessage } from '../GiftedChat'
6
+ import { DEFAULT_TEST_MESSAGE } from './data'
7
+
8
+ describe('SystemMessage', () => {
9
+ it('should not render <SystemMessage /> and compare with snapshot', () => {
10
+ const tree = renderer.create(<SystemMessage />).toJSON()
11
+ expect(tree).toMatchSnapshot()
12
+ })
13
+
14
+ it('should render <SystemMessage /> and compare with snapshot', () => {
15
+ const tree = renderer
16
+ .create(
17
+ <SystemMessage
18
+ currentMessage={{
19
+ ...DEFAULT_TEST_MESSAGE,
20
+ system: true,
21
+ }}
22
+ />
23
+ )
24
+ .toJSON()
25
+ expect(tree).toMatchSnapshot()
26
+ })
27
+ })
@@ -0,0 +1,29 @@
1
+ import 'react-native'
2
+ import React from 'react'
3
+ import renderer from 'react-test-renderer'
4
+
5
+ import { Time } from '../GiftedChat'
6
+ import { DEFAULT_TEST_MESSAGE } from './data'
7
+
8
+ describe('Time', () => {
9
+ it('should not render <Time /> and compare with snapshot', () => {
10
+ const component = renderer.create(<Time />)
11
+ const tree = component.toJSON()
12
+
13
+ expect(tree).toMatchSnapshot()
14
+ })
15
+
16
+ it('should render <Time /> and compare with snapshot', () => {
17
+ const component = renderer.create(
18
+ <Time
19
+ currentMessage={{
20
+ ...DEFAULT_TEST_MESSAGE,
21
+ createdAt: new Date(2022, 3, 17, 10, 5, 2),
22
+ }}
23
+ />
24
+ )
25
+ const tree = component.toJSON()
26
+
27
+ expect(tree).toMatchSnapshot()
28
+ })
29
+ })
@@ -0,0 +1,76 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should render <Actions /> and compare with snapshot 1`] = `
4
+ <View
5
+ accessibilityState={
6
+ {
7
+ "busy": undefined,
8
+ "checked": undefined,
9
+ "disabled": undefined,
10
+ "expanded": undefined,
11
+ "selected": undefined,
12
+ }
13
+ }
14
+ accessibilityValue={
15
+ {
16
+ "max": undefined,
17
+ "min": undefined,
18
+ "now": undefined,
19
+ "text": undefined,
20
+ }
21
+ }
22
+ accessible={true}
23
+ collapsable={false}
24
+ focusable={true}
25
+ onClick={[Function]}
26
+ onResponderGrant={[Function]}
27
+ onResponderMove={[Function]}
28
+ onResponderRelease={[Function]}
29
+ onResponderTerminate={[Function]}
30
+ onResponderTerminationRequest={[Function]}
31
+ onStartShouldSetResponder={[Function]}
32
+ style={
33
+ {
34
+ "height": 26,
35
+ "marginBottom": 10,
36
+ "marginLeft": 10,
37
+ "opacity": 1,
38
+ "width": 26,
39
+ }
40
+ }
41
+ >
42
+ <View
43
+ style={
44
+ [
45
+ {
46
+ "alignItems": "center",
47
+ "borderColor": "#b2b2b2",
48
+ "borderRadius": 13,
49
+ "borderWidth": 2,
50
+ "flex": 1,
51
+ "justifyContent": "center",
52
+ },
53
+ undefined,
54
+ ]
55
+ }
56
+ >
57
+ <Text
58
+ style={
59
+ [
60
+ {
61
+ "backgroundColor": "transparent",
62
+ "color": "#b2b2b2",
63
+ "fontSize": 16,
64
+ "fontWeight": "bold",
65
+ "lineHeight": 16,
66
+ "textAlign": "center",
67
+ },
68
+ undefined,
69
+ ]
70
+ }
71
+ >
72
+ +
73
+ </Text>
74
+ </View>
75
+ </View>
76
+ `;
@@ -0,0 +1,17 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should render <Avatar /> and compare with snapshot 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ {
8
+ "marginRight": 8,
9
+ },
10
+ undefined,
11
+ undefined,
12
+ ]
13
+ }
14
+ >
15
+ renderAvatar
16
+ </View>
17
+ `;
@@ -0,0 +1,145 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should render <Bubble /> and compare with snapshot 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ {
8
+ "alignItems": "flex-start",
9
+ "flex": 1,
10
+ },
11
+ undefined,
12
+ ]
13
+ }
14
+ >
15
+ <View
16
+ style={
17
+ [
18
+ {
19
+ "backgroundColor": "#f0f0f0",
20
+ "borderRadius": 15,
21
+ "justifyContent": "flex-end",
22
+ "marginRight": 60,
23
+ "minHeight": 20,
24
+ },
25
+ null,
26
+ null,
27
+ undefined,
28
+ ]
29
+ }
30
+ >
31
+ <View
32
+ accessibilityRole="text"
33
+ accessibilityState={
34
+ {
35
+ "busy": undefined,
36
+ "checked": undefined,
37
+ "disabled": undefined,
38
+ "expanded": undefined,
39
+ "selected": undefined,
40
+ }
41
+ }
42
+ accessible={true}
43
+ focusable={true}
44
+ onClick={[Function]}
45
+ onResponderGrant={[Function]}
46
+ onResponderMove={[Function]}
47
+ onResponderRelease={[Function]}
48
+ onResponderTerminate={[Function]}
49
+ onResponderTerminationRequest={[Function]}
50
+ onStartShouldSetResponder={[Function]}
51
+ >
52
+ <View>
53
+ <View
54
+ style={
55
+ [
56
+ {},
57
+ undefined,
58
+ ]
59
+ }
60
+ >
61
+ <Text
62
+ style={
63
+ [
64
+ {
65
+ "color": "black",
66
+ "fontSize": 16,
67
+ "lineHeight": 20,
68
+ "marginBottom": 5,
69
+ "marginLeft": 10,
70
+ "marginRight": 10,
71
+ "marginTop": 5,
72
+ },
73
+ undefined,
74
+ undefined,
75
+ ]
76
+ }
77
+ >
78
+ <Text
79
+ style={
80
+ [
81
+ [
82
+ {
83
+ "color": "black",
84
+ "fontSize": 16,
85
+ "lineHeight": 20,
86
+ "marginBottom": 5,
87
+ "marginLeft": 10,
88
+ "marginRight": 10,
89
+ "marginTop": 5,
90
+ },
91
+ undefined,
92
+ undefined,
93
+ ],
94
+ undefined,
95
+ ]
96
+ }
97
+ >
98
+ test
99
+ </Text>
100
+ </Text>
101
+ </View>
102
+ </View>
103
+ <View
104
+ style={
105
+ [
106
+ {
107
+ "flexDirection": "row",
108
+ "justifyContent": "flex-start",
109
+ },
110
+ undefined,
111
+ ]
112
+ }
113
+ >
114
+ <View
115
+ style={
116
+ [
117
+ {
118
+ "marginBottom": 5,
119
+ "marginLeft": 10,
120
+ "marginRight": 10,
121
+ },
122
+ undefined,
123
+ ]
124
+ }
125
+ >
126
+ <Text
127
+ style={
128
+ [
129
+ {
130
+ "color": "#aaa",
131
+ "fontSize": 10,
132
+ "textAlign": "right",
133
+ },
134
+ undefined,
135
+ ]
136
+ }
137
+ >
138
+ 7:20 PM
139
+ </Text>
140
+ </View>
141
+ </View>
142
+ </View>
143
+ </View>
144
+ </View>
145
+ `;
@@ -0,0 +1,21 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should compare Color with snapshot 1`] = `
4
+ {
5
+ "alizarin": "#e74c3c",
6
+ "backgroundTransparent": "transparent",
7
+ "black": "#000",
8
+ "carrot": "#e67e22",
9
+ "defaultBlue": "#0084ff",
10
+ "defaultColor": "#b2b2b2",
11
+ "emerald": "#2ecc71",
12
+ "leftBubbleBackground": "#f0f0f0",
13
+ "midnightBlue": "#2c3e50",
14
+ "optionTintColor": "#007AFF",
15
+ "peterRiver": "#3498db",
16
+ "timeTextColor": "#aaa",
17
+ "turquoise": "#1abc9c",
18
+ "white": "#fff",
19
+ "wisteria": "#8e44ad",
20
+ }
21
+ `;
@@ -0,0 +1,35 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should render <Composer /> and compare with snapshot 1`] = `
4
+ <TextInput
5
+ accessibilityLabel="Type a message..."
6
+ accessible={true}
7
+ autoFocus={false}
8
+ editable={true}
9
+ enablesReturnKeyAutomatically={true}
10
+ keyboardAppearance="default"
11
+ multiline={true}
12
+ onContentSizeChange={[Function]}
13
+ placeholder="Type a message..."
14
+ placeholderTextColor="#b2b2b2"
15
+ style={
16
+ [
17
+ {
18
+ "flex": 1,
19
+ "fontSize": 16,
20
+ "lineHeight": 22,
21
+ "marginBottom": 5,
22
+ "marginLeft": 10,
23
+ "marginTop": 6,
24
+ },
25
+ undefined,
26
+ {
27
+ "height": 33,
28
+ },
29
+ ]
30
+ }
31
+ testID="Type a message..."
32
+ underlineColorAndroid="transparent"
33
+ value=""
34
+ />
35
+ `;
@@ -0,0 +1,16 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should compare Constant with snapshot 1`] = `
4
+ {
5
+ "DATE_FORMAT": "ll",
6
+ "DEFAULT_PLACEHOLDER": "Type a message...",
7
+ "MAX_COMPOSER_HEIGHT": 200,
8
+ "MIN_COMPOSER_HEIGHT": 33,
9
+ "TEST_ID": {
10
+ "LOADING_WRAPPER": "GC_LOADING_CONTAINER",
11
+ "SEND_TOUCHABLE": "GC_SEND_TOUCHABLE",
12
+ "WRAPPER": "GC_WRAPPER",
13
+ },
14
+ "TIME_FORMAT": "LT",
15
+ }
16
+ `;
@@ -0,0 +1,37 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Day should not render <Day /> and compare with snapshot 1`] = `null`;
4
+
5
+ exports[`Day should render <Day /> and compare with snapshot 1`] = `
6
+ <View
7
+ style={
8
+ [
9
+ {
10
+ "alignItems": "center",
11
+ "justifyContent": "center",
12
+ "marginBottom": 10,
13
+ "marginTop": 5,
14
+ },
15
+ undefined,
16
+ ]
17
+ }
18
+ >
19
+ <View>
20
+ <Text
21
+ style={
22
+ [
23
+ {
24
+ "backgroundColor": "transparent",
25
+ "color": "#b2b2b2",
26
+ "fontSize": 12,
27
+ "fontWeight": "600",
28
+ },
29
+ undefined,
30
+ ]
31
+ }
32
+ >
33
+ Apr 17, 2022
34
+ </Text>
35
+ </View>
36
+ </View>
37
+ `;
@@ -0,0 +1,22 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`should render <GiftedAvatar /> and compare with snapshot 1`] = `
4
+ <View
5
+ accessibilityRole="image"
6
+ style={
7
+ [
8
+ {
9
+ "alignItems": "center",
10
+ "borderRadius": 20,
11
+ "height": 40,
12
+ "justifyContent": "center",
13
+ "width": 40,
14
+ },
15
+ {
16
+ "backgroundColor": "transparent",
17
+ },
18
+ {},
19
+ ]
20
+ }
21
+ />
22
+ `;