fix(e2e): workflow checks drive the reworked step cards (#1966)

A duration field with an id now takes its accessible name from its label
instead of a fixed 'Duration' aria-label.
This commit is contained in:
sam committed 2026-11-14 15:05:53 +11:00
1 parent 1d329bad35
commit cdfdf3a756
4 files changed
+9 -4

No files matched your search

+3
View File
@@ -36,12 +36,15 @@ module.exports = async ({ page, go, shot, settled }) => {
assert.ok(yaml.includes('steps.write-a-product-requirement-document.result'));
assert.ok(!yaml.includes('steps.Write a Product Requirement Document'));
await page.getByRole('tab', { name: 'Canvas', exact: true }).first().click();
const definitionPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
if (await definitionPicker.count()) { await definitionPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
const approval = page.locator('.vue-flow__node').filter({ hasText: 'Approval' }).first();
await panTo(approval);
await approval.click();
const chip = approval.getByRole('button', { name: 'write-a-product-requirement-document', exact: true });
await chip.waitFor();
await chip.click();
assert.match(await approval.getByLabel('Plan', { exact: true }).inputValue(), /steps\.write-a-product-requirement-document\.summary/);
await shot('legacy-reference');
await page.keyboard.press('Escape');
await page.getByRole('tab', { name: 'History', exact: true }).click();
+3 -3
View File
@@ -39,9 +39,9 @@ module.exports = async ({ page, go, shot, settled }) => {
assert.ok(!covered, 'zoom controls cover a step');
await shot(workflow);
const step = page.locator('.vue-flow__node').filter({ hasText: 'Prepare worktree' }).first();
assert.equal(await step.locator('[data-slot="badge"]').innerText(), 'Prepare worktree');
assert.match(await step.innerText(), /^\d+\.\s+Prepare worktree$/);
await step.click();
const dialog = page.getByRole('dialog');
const dialog = page.locator('[role="dialog"][data-slot="dialog-content"]');
await dialog.waitFor();
const dialogBox = await dialog.boundingBox();
assert.ok(dialogBox.x >= 0 && dialogBox.x + dialogBox.width <= 390, 'step editor exceeds phone width');
@@ -50,7 +50,7 @@ module.exports = async ({ page, go, shot, settled }) => {
await shot(`${workflow}-step`);
await page.keyboard.press('Escape');
await run.click();
await page.getByRole('dialog').waitFor();
await page.locator('[role="dialog"][data-slot="dialog-content"]').waitFor();
await shot(`${workflow}-run`);
await page.keyboard.press('Escape');
}
+2
View File
@@ -5,6 +5,8 @@ module.exports = async ({ page, go, shot }) => {
const runPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
if (await runPicker.count()) { await runPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
await page.locator('.vue-flow__node').filter({hasText:'Prepare worktree'}).first().click();
const more=page.getByRole('button',{name:'More',exact:true}).filter({hasText:'More'});
if (await more.getAttribute('aria-expanded')==='false') await more.click();
const condition=page.getByLabel('Run only when', {exact:true});
await condition.fill('what');
await page.getByRole('alert').filter({hasText:'when must name'}).first().waitFor();
@@ -53,7 +53,7 @@ function emitChange() {
:id="id"
:model-value="amount"
type="text"
aria-label="Duration"
:aria-label="id ? undefined : 'Duration'"
:aria-invalid="invalid || ariaInvalid === true || ariaInvalid === 'true' ? true : undefined"
@update:model-value="(value: string | number) => { amount = value; emitChange(); }"
inputmode="decimal"