From 473216fa2b78fc129a64f64d1e66c0a9d1a79d03 Mon Sep 17 00:00:00 2001 From: johba Date: Thu, 26 Mar 2026 08:17:17 +0000 Subject: [PATCH] fix: attemptStake helper produces /stakestake invalid route (#1168) Use URL.origin instead of splitting on '#' to construct the stake URL, preventing path duplication when the page is already on /stake. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/e2e/usertest/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/usertest/helpers.ts b/tests/e2e/usertest/helpers.ts index 9dd249d..cfcd05f 100644 --- a/tests/e2e/usertest/helpers.ts +++ b/tests/e2e/usertest/helpers.ts @@ -511,8 +511,8 @@ export async function attemptStake( ): Promise { console.log(`[${personaName}] Attempting to stake ${amount} KRK at tax rate ${taxRateIndex}%...`); - const baseUrl = page.url().split('#')[0]; - await page.goto(`${baseUrl}stake`); + const origin = new URL(page.url()).origin; + await page.goto(`${origin}/stake`); try { // Wait for stake form to fully load