test(ui): fix warnings (#4187)
* fix(ui): address test warnings * ignore lint error in test Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -12,11 +12,12 @@ vi.mock('@material-ui/core', async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
vi.mock('react-router-dom', () => ({
|
vi.mock('react-router-dom', () => ({
|
||||||
Link: ({ to, children, ...props }) => (
|
// eslint-disable-next-line react/display-name
|
||||||
<a href={to} {...props}>
|
Link: React.forwardRef(({ to, children, ...props }, ref) => (
|
||||||
|
<a href={to} ref={ref} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</a>
|
||||||
),
|
)),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
vi.mock('react-dnd', () => ({
|
vi.mock('react-dnd', () => ({
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ export const SaveQueueDialog = () => {
|
|||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
notify('ra.notification.created', 'info', { smart_count: 1 })
|
notify('ra.notification.created', {
|
||||||
|
type: 'info',
|
||||||
|
messageArgs: { smart_count: 1 },
|
||||||
|
})
|
||||||
dispatch(closeSaveQueueDialog())
|
dispatch(closeSaveQueueDialog())
|
||||||
refresh()
|
refresh()
|
||||||
history.push(`/playlist/${res.data.id}/show`)
|
history.push(`/playlist/${res.data.id}/show`)
|
||||||
|
|||||||
Reference in New Issue
Block a user