mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Add calling test that exercises virtual audio
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user