1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Accessibility: Improve note title focus handling (#10932)

This commit is contained in:
Henry Heino
2024-08-27 10:05:48 -07:00
committed by GitHub
parent 2afc2ca369
commit 74be949d33
14 changed files with 146 additions and 19 deletions

View File

@ -119,5 +119,29 @@ test.describe('richTextEditor', () => {
await editor.toggleEditorsButton.click();
await expect(editor.codeMirrorEditor).toHaveText('This is a test. Test! Another: !');
});
test('should be possible to navigate between the note title and rich text editor with enter/down/up keys', async ({ mainWindow }) => {
const mainScreen = new MainScreen(mainWindow);
await mainScreen.createNewNote('Testing keyboard navigation!');
const editor = mainScreen.noteEditor;
await editor.toggleEditorsButton.click();
await editor.richTextEditor.waitFor();
await editor.noteTitleInput.click();
await expect(editor.noteTitleInput).toBeFocused();
await mainWindow.keyboard.press('End');
await mainWindow.keyboard.press('ArrowDown');
await expect(editor.richTextEditor).toBeFocused();
await mainWindow.keyboard.press('ArrowUp');
await expect(editor.noteTitleInput).toBeFocused();
await mainWindow.keyboard.press('Enter');
await expect(editor.noteTitleInput).not.toBeFocused();
await expect(editor.richTextEditor).toBeFocused();
});
});