Files
40f625d2aa Update integration tests for v0.5 compatibility (#1369)
## 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]>
2025-10-09 05:29:25 -07:00

30 lines
950 B
TypeScript

import type { Page } from '@playwright/test';
import { expect } from './testExtensions';
import { TestGraphCanvas } from './testGraphCanvas';
export class TestInstalledApp {
readonly graphCanvas;
readonly vueApp;
readonly uiBlockedSpinner;
readonly firstTimeTemplateWorkflowText;
constructor(readonly window: Page) {
this.graphCanvas = new TestGraphCanvas(window);
this.vueApp = window.locator('#vue-app');
this.uiBlockedSpinner = this.vueApp.locator('.p-progressspinner');
// Use canvas container as a stable readiness indicator instead of text
this.firstTimeTemplateWorkflowText = this.graphCanvas.canvasContainer;
}
/** Waits until the app is completely loaded. */
async waitUntilLoaded(timeout = 1.5 * 60 * 1000) {
await expect(async () => {
await this.graphCanvas.expectLoaded();
await expect(this.uiBlockedSpinner).not.toBeVisible();
}).toPass({ timeout, intervals: [500] });
}
}