mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-08 21:54:26 +08:00
test: fix test isolation in test_installed_api_no_duplicates_across_scenarios
Fix sequential scenario test that was failing in Env 9 due to improper state management between scenarios. Root Cause: In scenario "CNR enabled + Nightly disabled": 1. Install Nightly → auto-disables CNR 2. Disable Nightly → both packages now disabled 3. Test expects: CNR enabled, Nightly disabled 4. Actual state: both disabled (CNR not re-enabled) Fix: Added enable operation after disabling Nightly to restore CNR to enabled state. This ensures the scenario accurately represents "CNR enabled + Nightly disabled" instead of leaving both packages disabled. Changes: - Added enable CNR operation after disabling Nightly in scenario 2 - Updated ui_id to be more descriptive (disable_nightly, enable_cnr) - Ensures proper state transition: both enabled → Nightly disabled → CNR re-enabled Test Results: - Before: 9/10 environments passing (90%) - After: 10/10 environments passing (100%) - All 63 tests passing across all environments Session Progress: - Session start: 7/10 environments (60/63 tests) - After parameter fix: 9/10 environments (62/63 tests) - Final: 10/10 environments (63/63 tests ✅) - Total improvement: +3 environments, +3 tests (+42.9%) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
fb3a67f22c
commit
b7a8f85530
@ -299,7 +299,7 @@ def test_installed_api_no_duplicates_across_scenarios(
|
||||
time.sleep(WAIT_TIME_MEDIUM)
|
||||
|
||||
elif scenario_id == "cnr_enabled_nightly_disabled":
|
||||
# Install Nightly then disable it
|
||||
# Install Nightly (this auto-disables CNR), then disable Nightly, then enable CNR
|
||||
response = api_client.queue_task(
|
||||
kind="install",
|
||||
ui_id=f"test_{scenario_id}_nightly",
|
||||
@ -314,9 +314,10 @@ def test_installed_api_no_duplicates_across_scenarios(
|
||||
assert response.status_code in [200, 201]
|
||||
time.sleep(WAIT_TIME_MEDIUM)
|
||||
|
||||
# Disable Nightly
|
||||
response = api_client.queue_task(
|
||||
kind="disable",
|
||||
ui_id=f"test_{scenario_id}_disable",
|
||||
ui_id=f"test_{scenario_id}_disable_nightly",
|
||||
params={"node_name": TEST_PACKAGE_ID},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
@ -324,6 +325,17 @@ def test_installed_api_no_duplicates_across_scenarios(
|
||||
assert response.status_code in [200, 201]
|
||||
time.sleep(WAIT_TIME_MEDIUM)
|
||||
|
||||
# Re-enable CNR (which was auto-disabled when Nightly was installed)
|
||||
response = api_client.queue_task(
|
||||
kind="enable",
|
||||
ui_id=f"test_{scenario_id}_enable_cnr",
|
||||
params={"cnr_id": TEST_PACKAGE_ID},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
response = api_client.start_queue()
|
||||
assert response.status_code in [200, 201]
|
||||
time.sleep(WAIT_TIME_MEDIUM)
|
||||
|
||||
elif scenario_id == "nightly_enabled_cnr_disabled":
|
||||
# CNR should already be disabled from previous scenario
|
||||
# Enable Nightly (install if not exists)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user