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:
2 files changed
+15
No files matched your search
@@ -162,6 +162,7 @@ class Blocks extends React.Component {
|
||||
this.setLocale();
|
||||
} else {
|
||||
this.props.vm.refreshWorkspace();
|
||||
this.requestToolboxUpdate();
|
||||
}
|
||||
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user