Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('ViewFormDropdown', () => {
expect(screen.queryByText('share.chat.chatSettingsTitle')).not.toBeInTheDocument()

// Find trigger (ActionButton renders a button)
const trigger = screen.getByRole('button')
const trigger = screen.getByRole('button', { name: 'share.chat.chatSettingsTitle' })
expect(trigger).toBeInTheDocument()

// Open dropdown
Expand All @@ -90,7 +90,7 @@ describe('ViewFormDropdown', () => {

const user = userEvent.setup()
render(<ViewFormDropdown />)
await user.click(screen.getByRole('button'))
await user.click(screen.getByRole('button', { name: 'share.chat.chatSettingsTitle' }))

expect(screen.getByText('Text Form')).toBeInTheDocument()
expect(screen.getByText('Num Form')).toBeInTheDocument()
Expand All @@ -99,7 +99,7 @@ describe('ViewFormDropdown', () => {
it('applies correct state to ActionButton when open', async () => {
const user = userEvent.setup()
render(<ViewFormDropdown />)
const trigger = screen.getByRole('button')
const trigger = screen.getByRole('button', { name: 'share.chat.chatSettingsTitle' })

// closed state
expect(trigger).not.toHaveClass('action-btn-hover')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ const ViewFormDropdown = () => {
render={(props, state) => (
<ActionButton
{...props}
aria-label={t(($) => $['chat.chatSettingsTitle'], { ns: 'share' })}
size="l"
state={state.open ? ActionButtonState.Hover : ActionButtonState.Default}
>
<RiChatSettingsLine className="h-4.5 w-4.5" />
<RiChatSettingsLine aria-hidden="true" className="h-4.5 w-4.5" />
</ActionButton>
)}
/>
Expand Down