From 6100e0f1990355088366002e2ddb87a9109cf785 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum <eric.rosenbaum@gmail.com> Date: Mon, 29 Jul 2019 14:00:04 -0400 Subject: [PATCH] Add integration tests for copy/paste --- test/integration/sounds.test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/integration/sounds.test.js b/test/integration/sounds.test.js index c8cd343cd..62bbd5085 100644 --- a/test/integration/sounds.test.js +++ b/test/integration/sounds.test.js @@ -141,4 +141,29 @@ describe('Working with sounds', () => { const logs = await getLogs(); await expect(logs).toEqual([]); }); + + test('Copy and pasting within a sound changes its duration', async () => { + await loadUri(uri); + await clickText('Sounds'); + await findByText('0.85', scope.soundsTab); // Original meow sound duration + await clickText('Copy', scope.soundsTab); + await clickText('Paste', scope.soundsTab); + await findByText('1.70', scope.soundsTab); // Sound has doubled in duration + + const logs = await getLogs(); + await expect(logs).toEqual([]); + }); + + test('Can copy a sound from a sprite and paste into a sound on the stage', async () => { + await loadUri(uri); + await clickText('Sounds'); + await clickText('Copy', scope.soundsTab); // Copy the meow sound + await clickXpath('//span[text()="Stage"]'); + await findByText('0.02', scope.soundsTab); // Original pop sound duration + await clickText('Paste', scope.soundsTab); + await findByText('0.87', scope.soundsTab); // Duration of pop + meow sound + + const logs = await getLogs(); + await expect(logs).toEqual([]); + }); }); -- GitLab