test(diffs): narrow retained note textarea handle

This commit is contained in:
Brennan Benson
2026-11-11 17:31:21 -08:00
parent f727ef07b5
commit d232ffb14f
+11 -6
View File
@@ -468,12 +468,17 @@ test.describe('Combined diff scroll restore', () => {
throw new Error('note textarea missing')
}
const selection = () =>
input.evaluate((element) => ({
focused: document.activeElement === element,
start: element.selectionStart,
end: element.selectionEnd,
body: element.value
}))
input.evaluate((element) => {
if (!(element instanceof HTMLTextAreaElement)) {
throw new Error('note control is not a textarea')
}
return {
focused: document.activeElement === element,
start: element.selectionStart,
end: element.selectionEnd,
body: element.value
}
})
await expect.poll(selection).toEqual({
focused: true,
start: 6,