diff --git a/web/app/components/plugins/install-plugin/install-from-marketplace/__tests__/index.spec.tsx b/web/app/components/plugins/install-plugin/install-from-marketplace/__tests__/index.spec.tsx
index 996fc0f28e3..aa65306fff9 100644
--- a/web/app/components/plugins/install-plugin/install-from-marketplace/__tests__/index.spec.tsx
+++ b/web/app/components/plugins/install-plugin/install-from-marketplace/__tests__/index.spec.tsx
@@ -198,6 +198,20 @@ describe('InstallFromMarketplace', () => {
expect(screen.getByText('plugin.installModal.installPlugin')).toBeInTheDocument()
})
+ it('should expose the current step title as the dialog name', () => {
+ render()
+
+ expect(screen.getByRole('dialog', { name: 'plugin.installModal.installPlugin' })).toBeInTheDocument()
+ })
+
+ it('should initially focus the safe cancel action', async () => {
+ render()
+
+ await waitFor(() => {
+ expect(screen.getByRole('button', { name: 'Cancel' })).toHaveFocus()
+ })
+ })
+
it('should render with bundle step when isBundle is true', () => {
const dependencies = createMockDependencies()
render(
@@ -293,7 +307,7 @@ describe('InstallFromMarketplace', () => {
fireEvent.click(screen.getByTestId('install-fail-btn'))
await waitFor(() => {
- expect(screen.getByText('plugin.installModal.installFailed')).toBeInTheDocument()
+ expect(screen.getByRole('dialog', { name: 'plugin.installModal.installFailed' })).toBeInTheDocument()
})
})
})
diff --git a/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx b/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx
index e12b9c5af73..5dac9075046 100644
--- a/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx
+++ b/web/app/components/plugins/install-plugin/install-from-marketplace/index.tsx
@@ -2,7 +2,7 @@
import type { Dependency, Plugin, PluginCategoryEnum, PluginManifestInMarket } from '../../types'
import { cn } from '@langgenius/dify-ui/cn'
-import { Dialog, DialogCloseButton, DialogContent } from '@langgenius/dify-ui/dialog'
+import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'
import * as React from 'react'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -84,12 +84,10 @@ const InstallFromMarketplace: React.FC = ({
backdropProps={{ forceRender: true }}
className={cn('w-[560px] max-w-none! overflow-hidden! text-left align-middle', cn(modalClassName, 'shadows-shadow-xl flex max-h-[calc(100dvh-48px)] min-w-[560px] flex-col items-start rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg p-0'))}
>
-
-
{
isBundle
@@ -134,6 +132,7 @@ const InstallFromMarketplace: React.FC = ({
>
)
}
+
)