diff --git a/tests/strategy_switch_worker_validation.mjs b/tests/strategy_switch_worker_validation.mjs index 824a9fa..00dcf38 100644 --- a/tests/strategy_switch_worker_validation.mjs +++ b/tests/strategy_switch_worker_validation.mjs @@ -1,7 +1,15 @@ import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, resolve } from "node:path"; import { __test } from "../web/strategy-switch-console/worker.js"; +const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); +const indexHtml = readFileSync(resolve(root, "web/strategy-switch-console/index.html"), "utf8"); +const renderPlatformsBody = indexHtml.match(/function renderPlatforms\(\) \{([\s\S]*?)\n \}/)?.[1] || ""; +assert.ok(!renderPlatformsBody.includes("syncStrategyForAccount(")); + const strategyProfiles = __test.normalizeStrategyProfilesPayload( [ { diff --git a/web/strategy-switch-console/index.html b/web/strategy-switch-console/index.html index 8f1eeec..5b8566c 100644 --- a/web/strategy-switch-console/index.html +++ b/web/strategy-switch-console/index.html @@ -1059,7 +1059,6 @@

切换摘要

strip.innerHTML = ""; for (const platform of Object.keys(platformMeta)) { ensureAccountSelection(platform); - syncStrategyForAccount(platform); const meta = platformMeta[platform]; const form = state.forms[platform]; const account = selectedAccount(platform); diff --git a/web/strategy-switch-console/page_asset.js b/web/strategy-switch-console/page_asset.js index 14839c9..ba893f1 100644 --- a/web/strategy-switch-console/page_asset.js +++ b/web/strategy-switch-console/page_asset.js @@ -1,2 +1,2 @@ // Generated by scripts/sync_strategy_switch_page_asset.py; do not edit by hand. -export const PAGE_HTML = "\n\n\n \n \n \n QuantRuntimeSettings Strategy Switch\n \n\n\n
\n
\n

策略切换

\n

选平台、目标账号和策略,一次执行完成切换。

\n
\n
\n \n \n \n
\n
\n\n
\n \n\n
\n
\n
\n 当前平台\n

LongBridge

\n
\n\n
\n \n\n \n\n
\n 模式\n
\n \n \n
\n
\n
\n\n
\n \n

登录后才可执行切换。

\n

\n
\n
\n\n \n
\n
\n\n \n\n\n"; +export const PAGE_HTML = "\n\n\n \n \n \n QuantRuntimeSettings Strategy Switch\n \n\n\n
\n
\n

策略切换

\n

选平台、目标账号和策略,一次执行完成切换。

\n
\n
\n \n \n \n
\n
\n\n
\n \n\n
\n
\n
\n 当前平台\n

LongBridge

\n
\n\n
\n \n\n \n\n
\n 模式\n
\n \n \n
\n
\n
\n\n
\n \n

登录后才可执行切换。

\n

\n
\n
\n\n \n
\n
\n\n \n\n\n";