mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
- Updated `src/global/typedefinition.ts` to include optional `origin` property in `DownloadResult` to fix TypeScript compilation error where `remove-complete` payload didn't have it defined. - Added `origin` payload in `electron/main/backend/install-manager.ts`. - Updated `e2e/basic.spec.ts` URL to `/` and expecting title including `星火应用商店` to match E2E setup.
28 lines
848 B
TypeScript
28 lines
848 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("应用基本功能", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/");
|
|
});
|
|
|
|
test("页面应该正常加载", async ({ page }) => {
|
|
await expect(page).toHaveTitle(/APM 应用商店|Spark Store|星火应用商店/);
|
|
});
|
|
|
|
test("应该显示应用列表", async ({ page }) => {
|
|
await page.waitForSelector(".app-card", { timeout: 10000 });
|
|
const appCards = page.locator(".app-card");
|
|
await expect(appCards.first()).toBeVisible();
|
|
});
|
|
|
|
test("搜索功能应该工作", async ({ page }) => {
|
|
const searchInput = page.locator('input[placeholder*="搜索"]').first();
|
|
await expect(searchInput).toBeVisible();
|
|
|
|
await searchInput.fill("test");
|
|
await searchInput.press("Enter");
|
|
|
|
await page.waitForTimeout(1000);
|
|
});
|
|
});
|