Skip to content
Snippets Groups Projects
Commit 58499cec authored by Eric Rosenbaum's avatar Eric Rosenbaum
Browse files

Add integration test for sound editor keyboard shortcuts

parent 28906090
Branches
Tags
No related merge requests found
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([]);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment