mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 12:59:18 +08:00
fix(web): restore skill tab unsaved close dialog styling
This commit is contained in:
parent
327bbfa96a
commit
018b213ae1
@ -46,7 +46,7 @@ describe('FileTabItem', () => {
|
||||
|
||||
render(<FileTabItem {...props} />)
|
||||
|
||||
expect(screen.getByText('readme.md')).toHaveClass('italic')
|
||||
expect(screen.getByText('readme.md')).toHaveClass('italic', 'pr-[0.5px]')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ const FileTabItem = ({
|
||||
<span
|
||||
className={cn(
|
||||
'max-w-40 truncate text-[13px] font-normal leading-4',
|
||||
isPreview && 'italic',
|
||||
isPreview && 'pr-[0.5px] italic',
|
||||
isActive
|
||||
? 'text-text-primary'
|
||||
: 'text-text-tertiary',
|
||||
|
||||
@ -210,7 +210,9 @@ describe('FileTabs', () => {
|
||||
render(<FileTabs />)
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: /common\.operation\.close/i }))
|
||||
fireEvent.click(screen.getByRole('button', { name: /workflow\.skillSidebar\.unsavedChanges\.confirmClose/i }))
|
||||
const confirmButton = screen.getByRole('button', { name: /workflow\.skillSidebar\.unsavedChanges\.confirmClose/i })
|
||||
expect(confirmButton.className).toContain('btn-destructive')
|
||||
fireEvent.click(confirmButton)
|
||||
|
||||
expect(mocks.closeTab).toHaveBeenCalledTimes(1)
|
||||
expect(mocks.closeTab).toHaveBeenCalledWith('file-1')
|
||||
|
||||
@ -134,7 +134,7 @@ const FileTabs = () => {
|
||||
<AlertDialogCancelButton>
|
||||
{t('operation.cancel', { ns: 'common' })}
|
||||
</AlertDialogCancelButton>
|
||||
<AlertDialogConfirmButton destructive={false} onClick={handleConfirmClose}>
|
||||
<AlertDialogConfirmButton onClick={handleConfirmClose}>
|
||||
{t('skillSidebar.unsavedChanges.confirmClose')}
|
||||
</AlertDialogConfirmButton>
|
||||
</AlertDialogActions>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user