mirror of
https://github.com/hanzo-studio/studio-desktop.git
synced 2026-10-30 18:54:12 +00:00
┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-1070-update-frontend-to-v1-14-5-1bd6d73d365081caa9c8e2453da57318) by [Unito](https://www.unito.io)
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
import { expect, test } from '../testExtensions';
|
|
|
|
test.describe('Install App', () => {
|
|
test('Can install app', async ({ installWizard, installedApp, serverStart, app, window }) => {
|
|
test.slow();
|
|
|
|
await installWizard.clickGetStarted();
|
|
|
|
// Select CPU as torch device
|
|
await installWizard.cpuToggle.click();
|
|
await installWizard.clickNext();
|
|
|
|
// Install to temp dir
|
|
const { installLocation } = app.testEnvironment;
|
|
await expect(installWizard.installLocationTitle).toBeVisible();
|
|
await installWizard.installLocationInput.fill(installLocation.path);
|
|
await installWizard.clickNext();
|
|
|
|
// Install stepper screens
|
|
await expect(installWizard.migrateTitle).toBeVisible();
|
|
await installWizard.clickNext();
|
|
|
|
await expect(installWizard.desktopSettingsTitle).toBeVisible();
|
|
await installWizard.installButton.click();
|
|
|
|
const status = await serverStart.status.get();
|
|
expect(['loading', 'setting up python']).toContain(status);
|
|
|
|
// Confirm window is maximized, then restore (for screenshot)
|
|
await expect(app.isMaximized()).resolves.toBe(true);
|
|
await app.restoreWindow();
|
|
|
|
// When the terminal is hidden and no error is shown, the install is successful
|
|
await expect(serverStart.terminal).not.toBeVisible({ timeout: 5 * 60 * 1000 });
|
|
await expect(serverStart.status.error).not.toBeVisible();
|
|
await expect(serverStart.showTerminalButton).not.toBeVisible();
|
|
|
|
// Wait for the progress spinner to disappear
|
|
await installedApp.waitUntilLoaded();
|
|
|
|
// Confirm post-install app state is as expected
|
|
await expect(installedApp.firstTimeTemplateWorkflowText).toBeVisible({ timeout: 30 * 1000 });
|
|
await expect(window).toHaveScreenshot('installApp.png');
|
|
});
|
|
});
|