test: fix playwright e2e connection refused error

The e2e test was hardcoded to navigate to `http://127.0.0.1:3344` instead
of using the configured `baseURL` in `playwright.config.ts` which points
to the Vite dev server (`http://localhost:5173`). This caused tests to
fail with `net::ERR_CONNECTION_REFUSED`.

This commit replaces the hardcoded URL with `/` so that Playwright
correctly uses the `baseURL` setting. It also updates the title assertion
to include "星火应用商店".
This commit is contained in:
vmomenv
2026-03-12 07:06:28 +00:00
parent fa990cb974
commit 6cbcf6fae3

View File

@@ -2,11 +2,11 @@ import { test, expect } from "@playwright/test";
test.describe("应用基本功能", () => {
test.beforeEach(async ({ page }) => {
await page.goto("http://127.0.0.1:3344");
await page.goto("/");
});
test("页面应该正常加载", async ({ page }) => {
await expect(page).toHaveTitle(/APM 应用商店|Spark Store/);
await expect(page).toHaveTitle(/星火应用商店|APM 应用商店|Spark Store/);
});
test("应该显示应用列表", async ({ page }) => {