mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
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:
@@ -2,11 +2,11 @@ import { test, expect } from "@playwright/test";
|
|||||||
|
|
||||||
test.describe("应用基本功能", () => {
|
test.describe("应用基本功能", () => {
|
||||||
test.beforeEach(async ({ page }) => {
|
test.beforeEach(async ({ page }) => {
|
||||||
await page.goto("http://127.0.0.1:3344");
|
await page.goto("/");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("页面应该正常加载", async ({ page }) => {
|
test("页面应该正常加载", async ({ page }) => {
|
||||||
await expect(page).toHaveTitle(/APM 应用商店|Spark Store/);
|
await expect(page).toHaveTitle(/星火应用商店|APM 应用商店|Spark Store/);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("应该显示应用列表", async ({ page }) => {
|
test("应该显示应用列表", async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user