[harness eval #34793] Docs: Scope control input ids to each <Controls /> block instance#22
[harness eval #34793] Docs: Scope control input ids to each <Controls /> block instance#22valentinpalkovic wants to merge 1 commit into
Conversation
|
Verify HarnessVerdict: PR-added unit tests: ❌ failed — vitest exited 1 without writing a JSON report (likely setup error); see Action log Files: vitest output (last 4KB)Replay: Screenshots
|
fe2f521 to
e537022
Compare
Verify HarnessVerdict: Reason: PR-added unit tests: ❌ failed — vitest exited 1 without writing a JSON report (likely setup error); see Action log Files: vitest output (last 4KB)Replay: Screenshots
|
Verify HarnessVerdict: Reason: PR-added unit tests: ✅ passed — 6716 passed, 0 failed across 2118 suite(s) Files: Replay: Screenshots
|
80ccd7d to
745162d
Compare
Verify HarnessVerdict: Reason: Compile output (last 4KB)PR-added unit tests: ✅ passed — 6716 passed, 0 failed across 2118 suite(s) Files: Replay: |
a11176d to
9de9d5b
Compare
Verify HarnessNo verdict produced — the workflow failed before the harness ran (likely recipe-author dispatch, deny-regex, or lint). See run log for details. |
Verify HarnessVerdict: Evidence (vision-check, Vision reasoningThe diff modifies control ID generation logic to include a PR-added unit tests: ✅ passed — 6716 passed, 0 failed across 2118 suite(s) Files: How Playwright validated thistest('multiple Controls blocks for same story get unique scoped input ids', async ({ page }, testInfo) => {
const pageErrors: string[] = [];
const consoleErrors: string[] = [];
page.on('pageerror', (err) => {
pageErrors.push(err.stack ?? err.message ?? String(err));
});
page.on('console', (msg) => {
if (msg.type() === 'error') consoleErrors.push(msg.text());
});
const baseURL =
process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';
try {
await page.goto(
`${baseURL}/?path=/story/addons-docs-blocks-controls--multiple-controls-for-same-story-on-same-page`
);
const recipe = new RecipePage(page, expect);
await recipe.waitUntilLoaded();
await expect(page.locator('#sb-errordisplay')).toBeHidden();
const previewIframe = recipe.previewIframe();
const previewRoot = recipe.previewRoot();
await expect(previewRoot).toBeVisible();
const controlIds = await previewIframe
.locator('[id^="control-"]')
.evaluateAll((els) => els.map((el) => el.id));
expect(controlIds.length).toBeGreaterThan(0);
const uniqueIds = new Set(controlIds);
expect(uniqueIds.size).toBe(controlIds.length);
const prefixes = new Set(
controlIds
.map((id) => {
const m = id.match(/^control-([^-]+)-/);
return m ? m[1] : null;
})
.filter((p): p is string => p !== null)
);
expect(prefixes.size).toBeGreaterThanOrEqual(2);
await previewIframe.locator('body').screenshot({
path: testInfo.outputPath('controls-blocks.png'),
fullPage: true,
});
} finally {
await testInfo.attach('pageErrors', {
body: JSON.stringify(pageErrors),
contentType: 'application/json',
});
await testInfo.attach('consoleErrors', {
body: JSON.stringify(consoleErrors),
contentType: 'application/json',
});
}
expect(filterPageErrors(pageErrors)).toEqual([]);
});Replay: Screenshots
|
ad75ba9 to
099b6f7
Compare
Verify HarnessVerdict: Reason: PR-added unit tests: ✅ passed — 6716 passed, 0 failed across 2118 suite(s) Files: How Playwright validated thistest('Controls block scopes input ids per-instance (useId)', async ({ page }, testInfo) => {
const pageErrors: string[] = [];
const consoleErrors: string[] = [];
page.on('pageerror', (err) => {
pageErrors.push(err.stack ?? err.message ?? String(err));
});
page.on('console', (msg) => {
if (msg.type() === 'error') consoleErrors.push(msg.text());
});
const baseURL =
process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';
try {
await page.goto(`${baseURL}/?path=/story/example-button--primary`);
const recipe = new RecipePage(page, expect);
await recipe.waitUntilLoaded();
const errorDisplay = page.locator('#sb-errordisplay');
await expect(errorDisplay).toBeHidden();
const controlsTab = page.getByRole('tab', { name: /controls/i });
await expect(controlsTab).toBeVisible({ timeout: 15000 });
await controlsTab.click();
const panel = page.locator('#storybook-panel-root');
await expect(panel).toBeVisible();
const controlEl = panel.locator('[id^="control-"]').first();
await expect(controlEl).toBeAttached({ timeout: 15000 });
const ids = await panel.locator('[id^="control-"]').evaluateAll((els) =>
els.map((el) => el.id),
);
expect(ids.length).toBeGreaterThan(0);
expect(new Set(ids).size).toBe(ids.length);
for (const id of ids) {
expect(id).toMatch(/^control-/);
}
await panel.screenshot({
path: testInfo.outputPath('controls-panel.png'),
});
} finally {
await testInfo.attach('pageErrors', {
body: JSON.stringify(pageErrors),
contentType: 'application/json',
});
await testInfo.attach('consoleErrors', {
body: JSON.stringify(consoleErrors),
contentType: 'application/json',
});
}
expect(filterPageErrors(pageErrors)).toEqual([]);
});Replay: |
41ea84d to
c990f5d
Compare
Verify HarnessVerdict: Reason: PR-added unit tests: ✅ passed — 6764 passed, 0 failed across 2128 suite(s) Files: How Playwright validated thistest('Controls block scopes control ids per instance', async ({ page }, testInfo) => {
const pageErrors: string[] = [];
const consoleErrors: string[] = [];
page.on('pageerror', (err) => {
pageErrors.push(err.stack ?? err.message ?? String(err));
});
page.on('console', (msg) => {
if (msg.type() === 'error') consoleErrors.push(msg.text());
});
const baseURL =
process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';
try {
await page.goto(
`${baseURL}/?path=/story/docs-blocks-controls--multiple-controls-for-same-story-on-same-page`
);
const sb = new RecipePage(page, expect);
await sb.waitUntilLoaded();
const errorDisplay = page.locator('#sb-errordisplay');
await expect(errorDisplay).toBeHidden();
const previewIframe = sb.previewIframe();
const previewRoot = previewIframe.locator('#storybook-root');
await expect(previewRoot).toBeVisible();
const controlIds = await previewRoot
.locator('[id^="control-"]')
.evaluateAll((els) => els.map((el) => el.id));
expect(controlIds.length).toBeGreaterThan(0);
expect(new Set(controlIds).size).toBe(controlIds.length);
const hasDisambiguator = controlIds.some((id) => {
const parts = id.split('-');
return parts.length >= 4;
});
expect(hasDisambiguator).toBe(true);
await previewIframe.locator('body').screenshot({
path: testInfo.outputPath('controls-blocks.png'),
});
} finally {
await testInfo.attach('pageErrors', {
body: JSON.stringify(pageErrors),
contentType: 'application/json',
});
await testInfo.attach('consoleErrors', {
body: JSON.stringify(consoleErrors),
contentType: 'application/json',
});
}
expect(filterPageErrors(pageErrors)).toEqual([]);
});Replay: Screenshots
|
Verify HarnessVerdict: Reason: PR-added unit tests: ✅ passed — 6764 passed, 0 failed across 2128 suite(s) Files: How Playwright validated thistest('multiple Controls blocks for same story produce unique control ids', async ({ page }, testInfo) => {
const pageErrors: string[] = [];
const consoleErrors: string[] = [];
page.on('pageerror', (err) => {
pageErrors.push(err.stack ?? err.message ?? String(err));
});
page.on('console', (msg) => {
if (msg.type() === 'error') consoleErrors.push(msg.text());
});
const baseURL =
process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';
try {
await page.goto(`${baseURL}/?path=/story/example-button--primary`);
const sb = new RecipePage(page, expect);
await sb.waitUntilLoaded();
const searchBox = page.getByRole('searchbox', { name: /search for components/i });
await searchBox.click();
await searchBox.fill('MultipleControlsForSameStoryOnSamePage');
const result = page
.getByRole('option', { name: /multiple controls for same story on same page/i })
.first();
await expect(result).toBeVisible({ timeout: 10000 });
await result.click();
const previewIframe = page.frameLocator('#storybook-preview-iframe');
const previewRoot = previewIframe.locator('#storybook-root:visible, #storybook-docs:visible');
await expect(previewRoot).toBeVisible({ timeout: 15000 });
await expect(page.locator('#sb-errordisplay')).toBeHidden();
const controlIds = await previewIframe
.locator('[id^="control-"]')
.evaluateAll((els) => els.map((el) => el.id));
expect(controlIds.length).toBeGreaterThan(0);
const uniqueIds = new Set(controlIds);
expect(uniqueIds.size).toBe(controlIds.length);
const suffixCounts = new Map<string, number>();
for (const id of controlIds) {
const m = id.match(/-([^-]+)$/);
if (m) suffixCounts.set(m[1], (suffixCounts.get(m[1]) ?? 0) + 1);
}
const duplicatedSuffixes = Array.from(suffixCounts.values()).filter((n) => n >= 2);
expect(duplicatedSuffixes.length).toBeGreaterThan(0);
await previewIReplay: Screenshots
|
c990f5d to
d80100e
Compare
Verify HarnessVerdict: Reason: PR-added unit tests: ❌ failed — 6944 passed, 1 failed across 2178 suite(s) Files: vitest output (last 4KB)How Playwright validated thistest('multiple Controls blocks for the same story produce unique control ids', async ({
page,
}, testInfo) => {
const pageErrors: string[] = [];
const consoleErrors: string[] = [];
page.on('pageerror', (err) => {
pageErrors.push(err.stack ?? err.message ?? String(err));
});
page.on('console', (msg) => {
if (msg.type() === 'error') consoleErrors.push(msg.text());
});
const baseURL =
process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';
try {
await page.goto(
`${baseURL}/?path=/story/docs-blocks-controls--multiple-controls-for-same-story-on-same-page`
);
const sb = new RecipePage(page, expect);
await sb.waitUntilLoaded();
const errorDisplay = page.locator('#sb-errordisplay');
await expect(errorDisplay).toBeHidden();
const previewIframe = sb.previewIframe();
const controlEls = previewIframe.locator('[id^="control-"]');
await expect(controlEls.first()).toBeAttached({ timeout: 15_000 });
const ids = await controlEls.evaluateAll((els) => els.map((el) => el.id));
expect(ids.length).toBeGreaterThan(0);
expect(new Set(ids).size).toBe(ids.length);
const setterEls = previewIframe.locator('[id^="set-"]');
const setterCount = await setterEls.count();
if (setterCount > 0) {
const setterIds = await setterEls.evaluateAll((els) => els.map((el) => el.id));
expect(new Set(setterIds).size).toBe(setterIds.length);
}
} finally {
await testInfo.attach('pageErrors', {
body: JSON.stringify(pageErrors),
contentType: 'application/json',
});
await testInfo.attach('consoleErrors', {
body: JSON.stringify(consoleErrors),
contentType: 'application/json',
});
}
expect(filterPageErrors(pageErrors)).toEqual([]);
expect(filterConsoleErrors(consoleErrors)).toEqual([]);
});Replay: Screenshots
|








Synthetic fork PR for agentic harness eval against storybookjs#34793.