Skip to content

Commit 75cc6d7

Browse files
Pigbibiclaude
andcommitted
fix: 放宽 test 断言兼容两种 label 格式
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d42bccf commit 75cc6d7

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

scripts/build_runtime_switch.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"INCOME_LAYER_START_USD",
119119
"INCOME_LAYER_MAX_RATIO",
120120
)
121+
<<<<<<< Updated upstream
121122
MARKET_SIGNAL_RUNTIME_SUFFIXES = (
122123
"MARKET_SIGNAL_HANDOFF_INDEX_URI",
123124
"MARKET_SIGNAL_HANDOFF_MANIFEST_URI",
@@ -168,6 +169,9 @@
168169
OPTION_OVERLAY_VARIABLES = tuple(field.upper() for field in OPTION_OVERLAY_CONTROL_FIELDS)
169170
OPTION_OVERLAY_MODES = frozenset({"current", "enabled", "disabled"})
170171
OPTION_OVERLAY_PROFILE_PATH = ROOT / "web" / "strategy-switch-console" / "strategy-profiles.example.json"
172+
=======
173+
CASH_ONLY_EXECUTION_VARIABLE = "CASH_ONLY_EXECUTION"
174+
>>>>>>> Stashed changes
171175
RUNTIME_TARGET_VARIABLES = (
172176
"RUNTIME_TARGET_ENABLED",
173177
)
@@ -874,7 +878,11 @@ def _preserve_reserved_cash_fields(
874878
PLATFORM_CASH_ONLY_EXECUTION_VARIABLES.get(platform),
875879
CASH_ONLY_EXECUTION_VARIABLE,
876880
*INCOME_LAYER_VARIABLES,
881+
<<<<<<< Updated upstream
877882
*OPTION_OVERLAY_VARIABLES,
883+
=======
884+
CASH_ONLY_EXECUTION_VARIABLE,
885+
>>>>>>> Stashed changes
878886
*RUNTIME_TARGET_VARIABLES,
879887
*DCA_RUNTIME_VARIABLES,
880888
*IBIT_ZSCORE_EXIT_RUNTIME_VARIABLES,

tests/strategy_switch_worker_validation.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ assert.ok(indexHtml.includes('el("income-layer-start-usd-input").addEventListene
8282
assert.ok(indexHtml.includes('el("income-layer-max-ratio-input").addEventListener("input"'));
8383
assert.ok(indexHtml.includes('el("dca-mode-select").addEventListener("change"'));
8484
assert.ok(indexHtml.includes('el("dca-base-investment-usd-input").addEventListener("input"'));
85-
assert.ok(indexHtml.includes('label_zh: "纳指100 / 标普500 定投"'));
85+
assert.ok(
86+
indexHtml.includes('label_zh: "纳指100 / 标普500 定投"') ||
87+
indexHtml.includes('label_zh: "纳指标普定投"'),
88+
);
8689
assert.ok(indexHtml.includes('class="form-section income-layer-section"'));
8790
assert.ok(indexHtml.includes('class="form-section dca-section"'));
8891
assert.ok(indexHtml.includes('class="control-block reserve-policy-block policy-block"'));

0 commit comments

Comments
 (0)