Merge pull request #4563 from paulkaplan/fix-tab-toolbox-refresh

Request a toolbox refresh after switching between tabs to fix #4561
This commit is contained in:
Paul Kaplan authored and GitHub committed 2019-02-15 11:27:01 -05:00
commit 1a2c3bd0b7
2 files changed
+15

No files matched your search

+1
View File
@@ -162,6 +162,7 @@ class Blocks extends React.Component {
this.setLocale();
} else {
this.props.vm.refreshWorkspace();
this.requestToolboxUpdate();
}
window.dispatchEvent(new Event('resize'));
+14
View File
@@ -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);
});
});