feat: enrich admin project list overview
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -83,9 +83,8 @@ export default function ProjectListPage() {
|
||||
<section className="admin-overview">
|
||||
<div className="admin-section-heading">
|
||||
<div>
|
||||
<span className="admin-section-heading__eyebrow">项目总览</span>
|
||||
<h2>平台项目与账号管理</h2>
|
||||
<p>集中查看项目数量、账号规模与最新创建情况。</p>
|
||||
<h2>项目总览</h2>
|
||||
<p className="admin-section-heading__supporting">平台项目与账号管理 — 集中查看项目数量、账号规模与最新创建情况。</p>
|
||||
</div>
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={() => setModalOpen(true)}>
|
||||
新建项目
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('ProjectListPage', () => {
|
||||
</BrowserRouter>,
|
||||
)
|
||||
|
||||
expect(await screen.findByText('项目总览')).toBeInTheDocument()
|
||||
expect(await screen.findByRole('heading', { name: '项目总览' })).toBeInTheDocument()
|
||||
expect(screen.getByText('项目总数')).toBeInTheDocument()
|
||||
expect(screen.getByText('账号总数')).toBeInTheDocument()
|
||||
expect(screen.getByPlaceholderText('搜索项目名称')).toBeInTheDocument()
|
||||
@@ -79,7 +79,7 @@ describe('ProjectListPage', () => {
|
||||
<ProjectListPage />
|
||||
</BrowserRouter>,
|
||||
)
|
||||
await screen.findByText('项目总览')
|
||||
await screen.findByRole('heading', { name: '项目总览' })
|
||||
const accountKpiCard = screen.getByText('账号总数').closest('article')!
|
||||
expect(within(accountKpiCard).getByText('--')).toBeInTheDocument()
|
||||
expect(within(accountKpiCard).getByText('暂无账号数据')).toBeInTheDocument()
|
||||
@@ -101,7 +101,7 @@ describe('ProjectListPage', () => {
|
||||
<ProjectListPage />
|
||||
</BrowserRouter>,
|
||||
)
|
||||
await screen.findByText('项目总览')
|
||||
await screen.findByRole('heading', { name: '项目总览' })
|
||||
const accountKpiCard = screen.getByText('账号总数').closest('article')!
|
||||
expect(within(accountKpiCard).getByText('--')).toBeInTheDocument()
|
||||
expect(within(accountKpiCard).getByText('暂无账号数据')).toBeInTheDocument()
|
||||
@@ -123,7 +123,7 @@ describe('ProjectListPage', () => {
|
||||
<ProjectListPage />
|
||||
</BrowserRouter>,
|
||||
)
|
||||
await screen.findByText('项目总览')
|
||||
await screen.findByRole('heading', { name: '项目总览' })
|
||||
const accountKpiCard = screen.getByText('账号总数').closest('article')!
|
||||
expect(within(accountKpiCard).getByText('8')).toBeInTheDocument()
|
||||
expect(within(accountKpiCard).getByText('项目管理员与项目经理账号')).toBeInTheDocument()
|
||||
@@ -226,7 +226,7 @@ describe('ProjectListPage', () => {
|
||||
</BrowserRouter>,
|
||||
)
|
||||
|
||||
await screen.findByText('项目总览')
|
||||
await screen.findByRole('heading', { name: '项目总览' })
|
||||
|
||||
const refreshButton = screen.getByRole('button', { name: '刷新列表' })
|
||||
expect(refreshButton).not.toBeDisabled()
|
||||
|
||||
Reference in New Issue
Block a user