mirror of
https://github.com/hanzo-studio/studio-desktop.git
synced 2026-10-30 18:54:12 +00:00
The card in the template workflows is a gif/animated, which caused the test to repeatedly fail. This masks it. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-1382-Mask-animated-card-content-29c6d73d36508131885bfac252deb96c) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <[email protected]>
40 lines
1.6 KiB
TypeScript
40 lines
1.6 KiB
TypeScript
import { expect, test } from '../testExtensions';
|
|
|
|
test.describe('Install App', () => {
|
|
test('Can install app', async ({ installWizard, installedApp, serverStart, testEnvironment, window }) => {
|
|
test.slow();
|
|
|
|
await installWizard.clickGetStarted();
|
|
|
|
// Select CPU as torch device
|
|
await installWizard.cpuToggle.click();
|
|
await installWizard.clickNext();
|
|
|
|
// Install to temp dir
|
|
const { installLocation } = testEnvironment;
|
|
await expect(installWizard.installLocationTitle).toBeVisible();
|
|
await installWizard.installLocationInput.fill(installLocation.path);
|
|
await installWizard.clickNext();
|
|
|
|
// Install stepper screens
|
|
await expect(installWizard.desktopSettingsTitle).toBeVisible();
|
|
await installWizard.installButton.click();
|
|
|
|
const status = await serverStart.status.get();
|
|
expect(['loading', 'setting up python']).toContain(status);
|
|
|
|
// 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 });
|
|
const templatesGrid = window.getByTestId('template-workflows-content');
|
|
await expect(window).toHaveScreenshot('installApp.png', { mask: [templatesGrid] });
|
|
});
|
|
});
|