This is an automated email from the ASF dual-hosted git repository. imbajin pushed a commit to branch feat/oink-core-platform in repository https://gitbox.apache.org/repos/asf/hugegraph-doc.git
commit 99eb0fa00f2c5b40de913435bb7d34ee05425ea3 Author: dark <[email protected]> AuthorDate: Fri Sep 4 20:35:22 2026 +0800 test(e2e): inspect alias before refresh - fetch the generated redirect document without browser navigation - assert raw refresh and canonical targets - avoid racing automatic meta refresh in Chromium --- tests/e2e/versioning.spec.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/e2e/versioning.spec.js b/tests/e2e/versioning.spec.js index 1e44a2cef..d800471da 100644 --- a/tests/e2e/versioning.spec.js +++ b/tests/e2e/versioning.spec.js @@ -45,15 +45,17 @@ for (const version of VERSION_IDS.slice(1)) { } } -test("1.0 flat Server URL remains a static alias", async ({ page }) => { +test("1.0 flat Server URL remains a static alias", async ({ request }) => { test.skip(!EXPECTED_IDS.includes("1.0"), "latest-only staging artifact"); - await page.goto("/versions/1.0/docs/quickstart/hugegraph-server/"); - await expect(page.locator('meta[http-equiv="refresh"]')).toHaveAttribute( - "content", - /quickstart\/hugegraph\/hugegraph-server/ + const response = await request.get( + "/versions/1.0/docs/quickstart/hugegraph-server/" ); - await expect(page.locator('link[rel="canonical"]')).toHaveAttribute( - "href", - /versions\/1\.0\/docs\/quickstart\/hugegraph\/hugegraph-server\// + expect(response.ok()).toBeTruthy(); + const body = await response.text(); + expect(body).toMatch( + /http-equiv="refresh"[^>]+quickstart\/hugegraph\/hugegraph-server/ + ); + expect(body).toMatch( + /rel="canonical"[^>]+versions\/1\.0\/docs\/quickstart\/hugegraph\/hugegraph-server\// ); });
