mirror of
https://github.com/hanzo-studio/studio-desktop.git
synced 2026-10-30 18:54:12 +00:00
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)
38 lines
1.4 KiB
TypeScript
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();
|
|
});
|
|
});
|