Skip to content

Commit 6100e0f

Browse files
committed
Add integration tests for copy/paste
1 parent 1563f78 commit 6100e0f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/integration/sounds.test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,29 @@ describe('Working with sounds', () => {
141141
const logs = await getLogs();
142142
await expect(logs).toEqual([]);
143143
});
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+
});
144169
});

0 commit comments

Comments
 (0)