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)
29 lines
889 B
TypeScript
29 lines
889 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');
|
|
|
|
this.firstTimeTemplateWorkflowText = window.getByText('Get started with a template');
|
|
}
|
|
|
|
/** 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] });
|
|
}
|
|
}
|