From 81bbcf834824d7d076fa8852aa9b97f6f9030b8a Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Wed, 30 Jan 2019 09:12:27 -0500
Subject: [PATCH] Add an integration test to cover renaming costumes updating
 the blocks

It looks like an "test.only" was left in on one of these tests by mistake.
---
 test/integration/blocks.test.js | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/test/integration/blocks.test.js b/test/integration/blocks.test.js
index 950d28587..1204fad1d 100644
--- a/test/integration/blocks.test.js
+++ b/test/integration/blocks.test.js
@@ -158,7 +158,7 @@ describe('Working with the blocks', () => {
         await expect(logs).toEqual([]);
     });
 
-    test.only('Record option from sound block menu opens sound recorder', async () => {
+    test('Record option from sound block menu opens sound recorder', async () => {
         await loadUri(uri);
         await clickXpath('//button[@title="Try It"]');
         await clickText('Code');
@@ -174,4 +174,20 @@ describe('Working with the blocks', () => {
         const logs = await getLogs();
         await expect(logs).toEqual([]);
     });
+
+    test('Renaming costume changes the default costume name in the toolbox', async () => {
+        await loadUri(uri);
+        await clickXpath('//button[@title="Try It"]');
+
+        // Rename the costume
+        await clickText('Costumes');
+        const el = await findByXpath("//input[@value='costume1']");
+        await el.sendKeys('newname');
+
+        // Make sure it is updated in the block menu
+        await clickText('Code');
+        await clickText('Looks', scope.blocksTab);
+        await driver.sleep(500); // Wait for scroll to finish
+        await clickText('newname', scope.blocksTab);
+    });
 });
-- 
GitLab