diff --git a/test/integration/sounds.test.js b/test/integration/sounds.test.js index 62bbd5085fac9b75e4fb770ab0a70efbe809f8c9..e564f511a3133d80e1eeb99320764e5d55918835 100644 --- a/test/integration/sounds.test.js +++ b/test/integration/sounds.test.js @@ -1,5 +1,6 @@ import path from 'path'; import SeleniumHelper from '../helpers/selenium-helper'; +import {Key} from 'selenium-webdriver'; const { clickText, @@ -166,4 +167,21 @@ describe('Working with sounds', () => { const logs = await getLogs(); await expect(logs).toEqual([]); }); + + test.only('Keyboard shortcuts', async () => { + await loadUri(uri); + await clickText('Sounds'); + const el = await findByXpath('//button[@aria-label="Choose a Sound"]'); + await el.sendKeys(Key.chord(Key.COMMAND, 'a')); // Select all + await findByText('0.85', scope.soundsTab); // Meow sound duration + await el.sendKeys(Key.DELETE); + await findByText('0.00', scope.soundsTab); // Sound is now empty + await el.sendKeys(Key.chord(Key.COMMAND, 'z')); // undo + await findByText('0.85', scope.soundsTab); // Meow sound is back + await el.sendKeys(Key.chord(Key.COMMAND, Key.SHIFT, 'z')); // redo + await findByText('0.00', scope.soundsTab); // Sound is empty again + + const logs = await getLogs(); + await expect(logs).toEqual([]); + }); });