test: NameItemEditor component - Focussing of Input element after click
This commit is contained in:
@@ -18,7 +18,13 @@ describe('NameItemEditor - Funktionalität', () => {
|
||||
onDelete
|
||||
};
|
||||
|
||||
test.todo('FocusIn nach Klick auf edit');
|
||||
test('Focus Input nach Klick auf edit', async () => {
|
||||
render(NameItemEditor, { props: baseProps });
|
||||
await fireEvent.click(screen.getByTestId('edit-button'));
|
||||
const input = screen.getByTestId('test-input');
|
||||
|
||||
expect(document.activeElement).toBe(input);
|
||||
});
|
||||
|
||||
it('zeigt initial Edit/Delete Buttons und aktuellen Namen', () => {
|
||||
render(NameItemEditor, { props: baseProps });
|
||||
|
||||
Reference in New Issue
Block a user