@linktr.ee/messaging-react 4.1.6-rc-1787162048 → 4.1.6-rc-1787162451
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/messaging-react",
|
|
3
|
-
"version": "4.1.6-rc-
|
|
3
|
+
"version": "4.1.6-rc-1787162451",
|
|
4
4
|
"description": "React messaging components built on messaging-core for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"chromatic:local": "yarn storybook:build && chromatic"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@linktr.ee/messaging-core": "2.5.0-rc-
|
|
53
|
+
"@linktr.ee/messaging-core": "2.5.0-rc-1787162451",
|
|
54
54
|
"@linktr.ee/messaging-taxonomy": "^0.10.0",
|
|
55
55
|
"@phosphor-icons/react": "^2.1.10"
|
|
56
56
|
},
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { describe, expect, it, vi } from 'vitest'
|
|
3
3
|
|
|
4
4
|
import { fireEvent, renderWithProviders, screen } from '../../test/utils'
|
|
5
|
+
import { getAvatarEmoji } from '../Avatar/getAvatarEmoji'
|
|
5
6
|
|
|
6
7
|
import { FaqListItem } from './FaqListItem'
|
|
7
8
|
|
|
@@ -115,6 +116,10 @@ describe('FaqList', () => {
|
|
|
115
116
|
it('renders enabled FAQs in ascending order and filters disabled FAQs', () => {
|
|
116
117
|
renderWithProviders(<FaqList faqs={faqs} onFaqClick={vi.fn()} />)
|
|
117
118
|
|
|
119
|
+
expect(
|
|
120
|
+
screen.getByRole('button', { name: 'How do I get started?' })
|
|
121
|
+
.parentElement
|
|
122
|
+
).toHaveStyle({ backgroundColor: '#F1F0EE' })
|
|
118
123
|
expect(
|
|
119
124
|
screen.getAllByRole('button').map((button) => button.textContent)
|
|
120
125
|
).toEqual(['How do I get started?', 'What payment methods do you accept?'])
|
|
@@ -124,10 +129,11 @@ describe('FaqList', () => {
|
|
|
124
129
|
})
|
|
125
130
|
|
|
126
131
|
it('renders the header only when headerText is provided', () => {
|
|
127
|
-
const { rerender } = renderWithProviders(
|
|
132
|
+
const { container, rerender } = renderWithProviders(
|
|
128
133
|
<FaqList faqs={faqs} onFaqClick={vi.fn()} />
|
|
129
134
|
)
|
|
130
135
|
expect(screen.queryByText('Frequently asked questions')).toBeNull()
|
|
136
|
+
expect(container.querySelector('p')).toBeNull()
|
|
131
137
|
|
|
132
138
|
rerender(
|
|
133
139
|
<FaqList
|
|
@@ -161,6 +167,7 @@ describe('FaqList', () => {
|
|
|
161
167
|
<FaqList faqs={faqs} onFaqClick={vi.fn()} avatarName="Brie Nala" />
|
|
162
168
|
)
|
|
163
169
|
expect(screen.queryAllByTestId('avatar-ring')).toHaveLength(1)
|
|
170
|
+
expect(screen.getByText(getAvatarEmoji('Brie Nala'))).toBeInTheDocument()
|
|
164
171
|
|
|
165
172
|
rerender(
|
|
166
173
|
<FaqList
|