Skip to content
Merged
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
6 changes: 5 additions & 1 deletion e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ export async function addStockAdjustment(page: Page, sku: string, qty: number, w
}
}
}
await dialog.locator('input[type="number"]').last().fill(String(qty))
// The qty field is step="1"; a separate required unit-cost field (step="any",
// title "Unit cost…") was added later, so target qty specifically rather than the
// last number input, and supply a unit cost for the positive new-product line.
await dialog.locator('input[type="number"][step="1"]').last().fill(String(qty))
await dialog.locator('input[title^="Unit cost"]').last().fill('10')
await dialog.getByRole('button', { name: /save adjustments/i }).click()

await dialog.getByText(/1 adjustment saved\./i).waitFor()
Expand Down
Loading