From 73426d16ba1fb5c37dc11841e204756f224ef4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 13:36:31 +0200 Subject: [PATCH 1/4] feat: add automatic workspace and project annotations to all tests Add an auto test-scoped fixture that pushes workspace and project annotations to every test via testInfo.annotations. The workspace name is derived from WorkspacePaths, and the project name comes from the Playwright project configuration. This requires zero changes in consumer workspaces. Assisted-by: OpenCode --- src/playwright/fixtures/test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/playwright/fixtures/test.ts b/src/playwright/fixtures/test.ts index e1711c1..4456227 100644 --- a/src/playwright/fixtures/test.ts +++ b/src/playwright/fixtures/test.ts @@ -3,12 +3,14 @@ import { test as base } from "@playwright/test"; import { LoginHelper, UIhelper } from "../helpers/index.js"; import { runOnce } from "../run-once.js"; import { $ } from "../../utils/bash.js"; +import { WorkspacePaths } from "../../utils/workspace-paths.js"; import path from "path"; type RHDHDeploymentTestFixtures = { rhdh: RHDHDeployment; uiHelper: UIhelper; loginHelper: LoginHelper; + autoAnnotations: void; }; type RHDHDeploymentWorkerFixtures = { @@ -61,6 +63,20 @@ const baseTest = base.extend< }, { scope: "test" }, ] as const, + autoAnnotations: [ + // eslint-disable-next-line no-empty-pattern + async ({}, use, testInfo) => { + testInfo.annotations.push( + { + type: "workspace", + description: path.basename(WorkspacePaths.workspaceRoot), + }, + { type: "project", description: testInfo.project.name }, + ); + await use(); + }, + { auto: true, scope: "test" }, + ], }); export const test = Object.assign(baseTest, { From a82769d432bb3e171fff5c8d7d9530db2b724322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 13:36:36 +0200 Subject: [PATCH 2/4] chore: bump version to 1.1.38 Assisted-by: OpenCode --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5cbe6f9..f5d563b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@red-hat-developer-hub/e2e-test-utils", - "version": "1.1.37", + "version": "1.1.38", "description": "Test utilities for RHDH E2E tests", "license": "Apache-2.0", "repository": { From f9b7cabb637cc5c0d62a3a19e6b1049cdac447a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 13:36:40 +0200 Subject: [PATCH 3/4] chore: add changelog entry for 1.1.38 Assisted-by: OpenCode --- docs/changelog.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index c315905..451ee01 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,7 +2,13 @@ All notable changes to this project will be documented in this file. -## [1.1.37] - Current +## [1.1.38] - Current + +### Added + +- **Automatic workspace and project annotations**: All tests now automatically receive `workspace` and `project` annotations via a Playwright [automatic fixture](https://playwright.dev/docs/test-fixtures#automatic-fixtures). The workspace name is derived from `testDir` and the project name comes from the Playwright project configuration. No consumer changes required. + +## [1.1.37] ### Added From 05460b7a93a9e348431fb0e93cd401b163d09988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 13:36:45 +0200 Subject: [PATCH 4/4] chore: update docs version to 1.1.38 Assisted-by: OpenCode --- docs/.vitepress/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 22b7418..6852131 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -33,7 +33,7 @@ export default defineConfig({ { text: "Examples", link: "/examples/" }, { text: "Overlay Testing", link: "/overlay/" }, { - text: "v1.1.37", + text: "v1.1.38", items: [{ text: "Changelog", link: "/changelog" }], }, ],