From 8e12f5dc7049fff9f7fab60054ccebfd43ee6a51 Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Mon, 7 May 2018 10:46:31 -0400
Subject: [PATCH] Add an integration test for adding extensions

---
 test/integration/blocks.test.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/integration/blocks.test.js b/test/integration/blocks.test.js
index 5fba5cfe4..2e0466d3b 100644
--- a/test/integration/blocks.test.js
+++ b/test/integration/blocks.test.js
@@ -103,4 +103,18 @@ describe('Working with the blocks', () => {
         const logs = await getLogs();
         await expect(logs).toEqual([]);
     });
+
+    test('Adding an extension', async () => {
+        await loadUri(uri);
+        await clickXpath('//button[@title="tryit"]');
+        await clickXpath('//button[@title="Add Extension"]');
+
+        await clickText('Pen');
+        await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
+        // Make sure toolbox has been scrolled to the pen extension
+        await findByText('stamp', scope.blocksTab);
+
+        const logs = await getLogs();
+        await expect(logs).toEqual([]);
+    });
 });
-- 
GitLab