mirror of
https://github.com/hanzoai/studio-desktop.git
synced 2026-10-30 18:21:16 +00:00
## Runtime change - Fixes window state not saved on launch ## Test changes - Updates integration test locators for frontend v1.27.x - Removes obsolete migrate step from install flow ### Migration step changes Migration is now combined with the install location step as an accordion section. ### Test locators updated - GPU selection: "Select GPU" → "Choose your hardware setup" - Install location: Updated input selector to use placeholder - Server status: "Finishing..." → "Loading Human Interface" - CPU toggle: Updated to role-based selector ### Window state fix Window bounds now captured on launch. Previously only saved on resize/move events. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-1369-Update-integration-tests-for-v0-5-compatibility-2876d73d3650811c88f1c81e55994f6b) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <[email protected]>
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import { getDefaultInstallLocation } from 'tests/shared/utils';
|
|
|
|
import { expect, test } from '../testExtensions';
|
|
|
|
test.describe('Troubleshooting - broken install path', () => {
|
|
test.beforeEach(async ({ testEnvironment }) => {
|
|
await testEnvironment.breakInstallPath();
|
|
});
|
|
|
|
test('Troubleshooting page loads when base path is invalid', async ({ troubleshooting, window }) => {
|
|
await troubleshooting.expectReady();
|
|
await expect(troubleshooting.basePathCard.rootEl).toBeVisible();
|
|
await expect(window).toHaveScreenshot('troubleshooting.png');
|
|
});
|
|
|
|
test('Refresh button is disabled whilst refreshing', async ({ troubleshooting }) => {
|
|
await troubleshooting.refresh();
|
|
await expect(troubleshooting.refreshButton).toBeDisabled();
|
|
|
|
// Wait for the refresh to complete
|
|
await troubleshooting.expectReady();
|
|
});
|
|
|
|
test('Can fix install path', async ({ troubleshooting, app, installedApp }) => {
|
|
await troubleshooting.expectReady();
|
|
const { basePathCard } = troubleshooting;
|
|
await expect(basePathCard.rootEl).toBeVisible();
|
|
|
|
const filePath = getDefaultInstallLocation();
|
|
await app.app.evaluate((electron, filePath) => {
|
|
// "Mock" the native dialog
|
|
electron.dialog.showOpenDialog = async () => {
|
|
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
return { canceled: false, filePaths: [filePath] };
|
|
};
|
|
}, filePath);
|
|
|
|
await basePathCard.button.click();
|
|
|
|
// Venv fixed - server should start
|
|
await installedApp.waitUntilLoaded(2 * 60 * 1000);
|
|
});
|
|
});
|