[FIX] web_editor: properly implement Powerbox navigation test
A Powerbox test was executed without first setting the selection in the DOM, which caused the Powerbox to close immediately. It also omitted to reopen the Powerbox after the first command selection, before using the arrow keys to navigate through the commands. Part-of: odoo/odoo#141303
This commit is contained in:
committed by
Sébastien Geelen (sge)
parent
69b92cad60
commit
3bc23ce5a5
@@ -135,10 +135,12 @@ describe('Powerbox', () => {
|
||||
],
|
||||
editable,
|
||||
});
|
||||
setSelection(editable, 0);
|
||||
powerbox.open();
|
||||
window.chai.expect(editable.innerText).to.eql('');
|
||||
await triggerEvent(editable, 'keydown', { key: 'Enter'});
|
||||
window.chai.expect(editable.innerText).to.eql('1');
|
||||
powerbox.open();
|
||||
await triggerEvent(editable, 'keydown', { key: 'ArrowDown'});
|
||||
await triggerEvent(editable, 'keydown', { key: 'Enter'});
|
||||
window.chai.expect(editable.innerText).to.eql('2');
|
||||
|
||||
Reference in New Issue
Block a user