mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +03:00
test: fix broken GlobalInfo.attach Windows test (#13441)
This commit is contained in:
parent
f6ccd4847e
commit
cdb68448e1
@ -239,14 +239,13 @@ test(`testInfo.attach should save attachments via inline attachment`, async ({ r
|
||||
});
|
||||
|
||||
test(`GlobalInfo.attach works`, async ({ runInlineTest }, testInfo) => {
|
||||
const external = testInfo.outputPath('external.txt');
|
||||
const result = await runInlineTest({
|
||||
'globalSetup.ts': `
|
||||
import fs from 'fs';
|
||||
import { FullConfig, GlobalInfo } from '@playwright/test';
|
||||
|
||||
async function globalSetup(config: FullConfig, globalInfo: GlobalInfo) {
|
||||
const external = '${external}';
|
||||
const external = 'external.txt';
|
||||
await fs.promises.writeFile(external, 'external');
|
||||
await globalInfo.attach('inline.txt', { body: Buffer.from('inline'), contentType: 'text/plain' });
|
||||
await globalInfo.attach('external.txt', { path: external, contentType: 'text/plain' });
|
||||
|
Loading…
Reference in New Issue
Block a user