mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 18:37:24 +00:00
test(diffs): narrow retained note textarea handle
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user