File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
2
import SeleniumHelper from '../helpers/selenium-helper' ;
3
+ import { Key } from 'selenium-webdriver' ;
3
4
4
5
const {
5
6
clickText,
@@ -166,4 +167,21 @@ describe('Working with sounds', () => {
166
167
const logs = await getLogs ( ) ;
167
168
await expect ( logs ) . toEqual ( [ ] ) ;
168
169
} ) ;
170
+
171
+ test . only ( 'Keyboard shortcuts' , async ( ) => {
172
+ await loadUri ( uri ) ;
173
+ await clickText ( 'Sounds' ) ;
174
+ const el = await findByXpath ( '//button[@aria-label="Choose a Sound"]' ) ;
175
+ await el . sendKeys ( Key . chord ( Key . COMMAND , 'a' ) ) ; // Select all
176
+ await findByText ( '0.85' , scope . soundsTab ) ; // Meow sound duration
177
+ await el . sendKeys ( Key . DELETE ) ;
178
+ await findByText ( '0.00' , scope . soundsTab ) ; // Sound is now empty
179
+ await el . sendKeys ( Key . chord ( Key . COMMAND , 'z' ) ) ; // undo
180
+ await findByText ( '0.85' , scope . soundsTab ) ; // Meow sound is back
181
+ await el . sendKeys ( Key . chord ( Key . COMMAND , Key . SHIFT , 'z' ) ) ; // redo
182
+ await findByText ( '0.00' , scope . soundsTab ) ; // Sound is empty again
183
+
184
+ const logs = await getLogs ( ) ;
185
+ await expect ( logs ) . toEqual ( [ ] ) ;
186
+ } ) ;
169
187
} ) ;
You can’t perform that action at this time.
0 commit comments