From 2d395e3489d29677ea0acf0c44aa6a7894e264ef Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Fri, 4 May 2018 14:47:10 -0400 Subject: [PATCH] Add undo testing to paint editor integration test --- test/integration/costumes.test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/integration/costumes.test.js b/test/integration/costumes.test.js index 04a0f338c..6cc036901 100644 --- a/test/integration/costumes.test.js +++ b/test/integration/costumes.test.js @@ -88,4 +88,19 @@ describe('Working with costumes', () => { const logs = await getLogs(); await expect(logs).toEqual([]); }); + + test('Undo/redo in the paint editor', async () => { + await loadUri(uri); + await clickXpath('//button[@title="tryit"]'); + await clickText('Costumes'); + await clickText('costume1', scope.costumesTab); + await clickText('Convert to Bitmap', scope.costumesTab); + await clickXpath('//img[@alt="Undo"]'); + await clickText('Convert to Bitmap', scope.costumesTab); + await clickXpath('//img[@alt="Undo"]'); + await clickXpath('//img[@alt="Redo"]'); + await clickText('Convert to Vector', scope.costumesTab); + const logs = await getLogs(); + await expect(logs).toEqual([]); + }); }); -- GitLab