mirror of
https://github.com/hanzoai/studio-desktop.git
synced 2026-10-30 18:21:16 +00:00
## Summary - in `hasRequirements`, treat missing/changed known packages as `package-upgrade` instead of `error` - add/adjust unit tests for `hasRequirements` to reflect the upgrade flow behavior (missing packages => package-upgrade, not maintenance) ## Context During validation, a dry-run detected older comfyui-workflow-templates/comfyui-embedded-docs and returned `pythonPackages: error`, sending users to maintenance. The dry-run output matched the known upgrade path, so it should trigger the package upgrade flow, not a fatal error. ## Testing - Unit tests updated for `hasRequirements` (tsc/lint via lint-staged)
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { expect, test } from '../testExtensions';
|
|
|
|
test.describe('Troubleshooting - broken venv', () => {
|
|
test.beforeEach(async ({ testEnvironment }) => {
|
|
await testEnvironment.breakVenv();
|
|
});
|
|
|
|
test('Troubleshooting page loads when venv is broken', async ({ troubleshooting, window }) => {
|
|
await troubleshooting.expectReady();
|
|
await expect(troubleshooting.resetVenvCard.rootEl).toBeVisible();
|
|
await expect(window).toHaveScreenshot('troubleshooting-venv.png');
|
|
});
|
|
|
|
test('Can fix venv', async ({ troubleshooting, installedApp }) => {
|
|
test.slow();
|
|
|
|
await troubleshooting.expectReady();
|
|
const { resetVenvCard, installPythonPackagesCard } = troubleshooting;
|
|
await expect(resetVenvCard.rootEl).toBeVisible();
|
|
|
|
await resetVenvCard.button.click();
|
|
await troubleshooting.confirmRecreateVenvButton.click();
|
|
await expect(resetVenvCard.isRunningIndicator).toBeVisible();
|
|
|
|
await expect(installPythonPackagesCard.rootEl).toBeVisible({ timeout: 60 * 1000 });
|
|
await installPythonPackagesCard.button.click();
|
|
await troubleshooting.confirmInstallPythonPackagesButton.click();
|
|
await expect(installPythonPackagesCard.isRunningIndicator).toBeVisible();
|
|
|
|
// Venv fixed - server should start
|
|
await installedApp.waitUntilLoaded(3 * 60 * 1000);
|
|
});
|
|
});
|