From e20420f5120edd9386f7d31deadc9e50640b9887 Mon Sep 17 00:00:00 2001 From: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 06:22:57 +0000 Subject: [PATCH 1/2] fix(#3788): replace clickBtnInCard with auto-retrying locator The clickBtnInCard helper uses XPath + scrollIntoViewIfNeeded which does not auto-retry on DOM detachment. When React re-renders the Templates page card list between locator resolution and the scroll action, the old DOM node is detached, causing Element is not attached to the DOM errors. Replace the clickBtnInCard call in runScaffolderTemplate with Playwright built-in locator chain (locator + filter + getByRole + click) which handles element location, scrolling, and retry automatically, eliminating the DOM detachment race condition. Closes #3788 --- .../e2e-tests/tests/specs/gitlab-scaffolder-actions.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/workspaces/backstage/e2e-tests/tests/specs/gitlab-scaffolder-actions.spec.ts b/workspaces/backstage/e2e-tests/tests/specs/gitlab-scaffolder-actions.spec.ts index d0b45fa9bc..344c4efa83 100644 --- a/workspaces/backstage/e2e-tests/tests/specs/gitlab-scaffolder-actions.spec.ts +++ b/workspaces/backstage/e2e-tests/tests/specs/gitlab-scaffolder-actions.spec.ts @@ -35,7 +35,11 @@ async function runScaffolderTemplate( fillParameters: () => Promise, ): Promise { await uiHelper.verifyHeading("Templates"); - await uiHelper.clickBtnInCard(templateTitle, "Choose"); + await page + .locator('div[class*="MuiCard-root"]') + .filter({ hasText: templateTitle }) + .getByRole("button", { name: "Choose" }) + .click(); await uiHelper.waitForTitle(templateTitle, 2); await fillParameters(); const reviewButton = page.getByRole("button", { name: "Review" }); From b024d977b88aa58af199b3f03741ae1732a17ce3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 13:07:40 +0000 Subject: [PATCH 2/2] chore: sync `versions.json` from `main` --- versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.json b/versions.json index 28d9616487..0dd1bcb7d4 100644 --- a/versions.json +++ b/versions.json @@ -1,6 +1,6 @@ { "backstage": "1.54.6", "node": "24.19.0", - "cli": "2.0.3", + "cli": "2.1.0", "cliPackage": "@red-hat-developer-hub/cli" }