diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index d548ccff8db04a5819e5367faee5b04cdde6f7bb..ecb998ea4c767e8ff7c6366140ccdfd5a50756ff 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -162,6 +162,7 @@ class Blocks extends React.Component { this.setLocale(); } else { this.props.vm.refreshWorkspace(); + this.requestToolboxUpdate(); } window.dispatchEvent(new Event('resize')); diff --git a/test/integration/blocks.test.js b/test/integration/blocks.test.js index 938508111ce538ee59d18aadb373a434b2d48429..e6c37b24a7a523e4d7051545bb3463fdc99a5419 100644 --- a/test/integration/blocks.test.js +++ b/test/integration/blocks.test.js @@ -252,4 +252,18 @@ describe('Working with the blocks', () => { await driver.sleep(500); // Wait for scroll to finish await clickText('my\u00A0variable'); }); + + // Regression test for switching editor tabs causing toolbox to stop updating + test('Creating variables after adding extensions updates the toolbox', async () => { + await loadUri(uri); + await clickText('Costumes'); + await clickText('Code'); + await clickText('Variables', scope.blocksTab); + await driver.sleep(500); // Wait for scroll + await clickText('Make a List'); + const el = await findByXpath("//input[@name='New list name:']"); + await el.sendKeys('list1'); + await clickButton('OK'); + await clickText('list1', scope.blocksTab); + }); });