From a4eb0b340cf89c03008909145e8dacfc2aa3bea3 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Tue, 22 Oct 2024 13:34:45 +0200 Subject: [PATCH] track parent step for attachments.push --- packages/playwright/src/worker/testInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playwright/src/worker/testInfo.ts b/packages/playwright/src/worker/testInfo.ts index 028bc3ff1f..6f949957ea 100644 --- a/packages/playwright/src/worker/testInfo.ts +++ b/packages/playwright/src/worker/testInfo.ts @@ -193,7 +193,7 @@ export class TestInfoImpl implements TestInfo { this._attachmentsPush = this.attachments.push.bind(this.attachments); this.attachments.push = (...attachments: TestInfo['attachments']) => { for (const a of attachments) - this._attach(a, undefined); + this._attach(a, this._parentStep()?.stepId); return this.attachments.length; };