mirror of
https://github.com/hanzoai/studio-desktop.git
synced 2026-10-30 18:21:16 +00:00
* Ensure install test disposes test env * nit * Add post-install setup project * [Refactor] Re-export expect to enable custom tests * [Refactor] Use class properties for locators * Add post-install app setup "test" * [Refactor] Set dispose test environment at project level * [DevExp] Use soft fail for install location
18 lines
555 B
TypeScript
18 lines
555 B
TypeScript
import type { Page } from '@playwright/test';
|
|
|
|
import { expect } from './testExtensions';
|
|
|
|
export class TestGraphCanvas {
|
|
readonly canvasContainer;
|
|
|
|
constructor(readonly window: Page) {
|
|
this.canvasContainer = window.locator('.graph-canvas-container');
|
|
}
|
|
|
|
/** Can be used with `expect().toPass()`. Resolves when canvas container is visible and has a child canvas element. */
|
|
expectLoaded = async () => {
|
|
await expect(this.canvasContainer).toBeVisible();
|
|
await expect(this.canvasContainer.locator('canvas')).not.toHaveCount(0);
|
|
};
|
|
}
|