Files
studio-desktop/tests/integration/post-install/troubleshootingVenv.spec.ts
filteredandGitHub 01c39e7655 [Test] Temporarily increase test duration (#1125)
Should remain until torch 2.7.x is in compiled requirements. Revert when
#1115 is resolved.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-1125-Test-Temporarily-increase-test-duration-1df6d73d3650818eb96be1bac173d46f)
by [Unito](https://www.unito.io)
2025-04-26 04:31:31 +10:00

38 lines
1.4 KiB
TypeScript

import { expect, test } from '../testExtensions';
test.describe('Troubleshooting - broken venv', () => {
test.beforeEach(async ({ app }) => {
await app.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, serverStart, 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: 30 * 1000 });
await installPythonPackagesCard.button.click();
await troubleshooting.confirmInstallPythonPackagesButton.click();
await expect(installPythonPackagesCard.isRunningIndicator).toBeVisible();
// Venv fixed - server should start
// TODO: Reduce from 3 minutes to 1.5 minutes
// https://github.com/Comfy-Org/desktop/issues/1115
await serverStart.expectServerStarts(3 * 60 * 1000);
await installedApp.waitUntilLoaded();
});
});