@@ -141,4 +141,29 @@ describe('Working with sounds', () => {
141
141
const logs = await getLogs ( ) ;
142
142
await expect ( logs ) . toEqual ( [ ] ) ;
143
143
} ) ;
144
+
145
+ test ( 'Copy and pasting within a sound changes its duration' , async ( ) => {
146
+ await loadUri ( uri ) ;
147
+ await clickText ( 'Sounds' ) ;
148
+ await findByText ( '0.85' , scope . soundsTab ) ; // Original meow sound duration
149
+ await clickText ( 'Copy' , scope . soundsTab ) ;
150
+ await clickText ( 'Paste' , scope . soundsTab ) ;
151
+ await findByText ( '1.70' , scope . soundsTab ) ; // Sound has doubled in duration
152
+
153
+ const logs = await getLogs ( ) ;
154
+ await expect ( logs ) . toEqual ( [ ] ) ;
155
+ } ) ;
156
+
157
+ test ( 'Can copy a sound from a sprite and paste into a sound on the stage' , async ( ) => {
158
+ await loadUri ( uri ) ;
159
+ await clickText ( 'Sounds' ) ;
160
+ await clickText ( 'Copy' , scope . soundsTab ) ; // Copy the meow sound
161
+ await clickXpath ( '//span[text()="Stage"]' ) ;
162
+ await findByText ( '0.02' , scope . soundsTab ) ; // Original pop sound duration
163
+ await clickText ( 'Paste' , scope . soundsTab ) ;
164
+ await findByText ( '0.87' , scope . soundsTab ) ; // Duration of pop + meow sound
165
+
166
+ const logs = await getLogs ( ) ;
167
+ await expect ( logs ) . toEqual ( [ ] ) ;
168
+ } ) ;
144
169
} ) ;
0 commit comments