From c38d9ffb54fcbb8d4ac6e06842511d02a0d4f788 Mon Sep 17 00:00:00 2001 From: osohyun0224 Date: Sun, 5 May 2024 20:41:55 +0900 Subject: [PATCH] feat(test): Add 'url' field to annotations The 'url' field is added to the test annotations to provide a distinct way to store links alongside descriptions. This change allows annotations to include URLs for improved clarity and direct linking, which enhances test report organization. References: #30095 --- packages/playwright/src/common/config.ts | 2 +- packages/playwright/types/test.d.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/playwright/src/common/config.ts b/packages/playwright/src/common/config.ts index 9b8be8e730..cfa54563f7 100644 --- a/packages/playwright/src/common/config.ts +++ b/packages/playwright/src/common/config.ts @@ -35,7 +35,7 @@ export type FixturesWithLocation = { fixtures: Fixtures; location: Location; }; -export type Annotation = { type: string, description?: string }; +export type Annotation = { type: string, description?: string, url?: string }; export const defaultTimeout = 30000; diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 7883711476..47ee166bf2 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -7998,6 +7998,11 @@ export interface TestInfo { * Optional description. */ description?: string; + + /** + * Optional URL to provide additional context or link to an issue tracker. + */ + url?: string; }>; /**