Files
studio-desktop/tests/integration/testGraphCanvas.ts
filteredandGitHub 1a06378d5d [e2e] Implement install process for post-install tests (#907)
* 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
2025-02-15 20:54:10 +11:00

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);
};
}