Add calling test that exercises virtual audio

This commit is contained in:
Miriam Zimmerman
2025-09-24 13:41:37 -04:00
committed by GitHub
parent 0bdc96f0a9
commit 0eabffe3cf
7 changed files with 203 additions and 31 deletions

View File

@@ -568,6 +568,23 @@ export class Bootstrap {
await fs.writeFile(path.join(outDir, `screenshot-${id}.png`), screenshot);
}
public async screenshotWindow(
window: Page,
testName?: string
): Promise<void> {
const outDir = await this.#getArtifactsDir(testName);
if (outDir == null) {
return;
}
const screenshot = await window.screenshot();
const id = this.#screenshotId;
this.#screenshotId += 1;
await fs.writeFile(path.join(outDir, `screenshot-${id}.png`), screenshot);
}
public async saveLogs(
app: App | undefined = this.#lastApp,
testName?: string