Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ async function runScaffolderTemplate(
fillParameters: () => Promise<void>,
): Promise<void> {
await uiHelper.verifyHeading("Templates");
await uiHelper.clickBtnInCard(templateTitle, "Choose");
await page
.locator('div[class*="MuiCard-root"]')
.filter({ hasText: templateTitle })
.getByRole("button", { name: "Choose" })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] edge-case

The locator chain does not include .first(), unlike the equivalent fix already landed in the orchestrator workspace (orchestrator-po.ts:383). Without .first(), Playwright operates in strict mode — if filter({ hasText: templateTitle }) ever matches more than one card (e.g., a template title is a substring of another card's text), the .click() will throw a strict-mode violation.

Suggested fix: Append .first() before .click(), consistent with the orchestrator pattern.

.click();
await uiHelper.waitForTitle(templateTitle, 2);
await fillParameters();
const reviewButton = page.getByRole("button", { name: "Review" });
Expand Down
Loading