mirror of
https://github.com/hanzo-studio/studio-desktop.git
synced 2026-10-30 18:54:12 +00:00
* nit - Rename * [e2e] Add recreate virtual environment test * Add test expectation * Fix button name * Replace manual test env cleanup with disposable * [Dev] Fix vscode debug + playwright ext. conflict Breaks on caught exceptions that are within another class member * Fix venv creation - use confirm buttons & wait for server start * Fix server start timeout too short * Fix new disposable clean up never runs
19 lines
538 B
TypeScript
19 lines
538 B
TypeScript
import type { Page } from '@playwright/test';
|
|
|
|
export class TestTaskCard {
|
|
readonly rootEl;
|
|
readonly button;
|
|
readonly isRunningIndicator;
|
|
|
|
constructor(
|
|
readonly window: Page,
|
|
title: RegExp,
|
|
buttonText: string
|
|
) {
|
|
const titleDiv = window.getByText(title);
|
|
this.rootEl = window.locator('div.task-div').filter({ has: titleDiv });
|
|
this.button = this.rootEl.locator('_vue=Button').filter({ hasText: buttonText });
|
|
this.isRunningIndicator = this.button.and(this.rootEl.locator('.p-button-loading'));
|
|
}
|
|
}
|