import { test, expect } from '../fixtures/auth.fixture'; test.describe('插件管理', () => { test('插件管理页面加载', async ({ page }) => { await page.goto('/#/'); // 侧边栏显示"扩展管理插件管理" await page.locator('text=扩展管理').first().click(); await page.waitForLoadState('networkidle'); // 页面不崩溃 await expect(page.locator('main')).toBeVisible(); }); test('刷新按钮可点击', async ({ page }) => { await page.goto('/#/'); await page.locator('text=扩展管理').first().click(); await page.waitForLoadState('networkidle'); const refreshBtn = page.locator('button:has-text("刷新")'); if (await refreshBtn.isVisible().catch(() => false)) { await expect(refreshBtn).toBeEnabled(); await refreshBtn.click(); await expect(page.locator('main')).toBeVisible(); } }); });