From e9dd6ffe3fbd97ea98de236d2cc8a41c9de96726 Mon Sep 17 00:00:00 2001 From: zspriggs Date: Thu, 11 Jun 2026 14:56:21 -0400 Subject: [PATCH 1/7] wip: adjust flyout and collapse logic --- .../core/dragging/block_drag_strategy.ts | 20 ++++++++++ .../core/toolbox/collapsible_category.ts | 39 ++++++++++++++++++- packages/blockly/tests/mocha/toolbox_test.js | 2 + 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/packages/blockly/core/dragging/block_drag_strategy.ts b/packages/blockly/core/dragging/block_drag_strategy.ts index b32c59c7ac9..97f73c55b42 100644 --- a/packages/blockly/core/dragging/block_drag_strategy.ts +++ b/packages/blockly/core/dragging/block_drag_strategy.ts @@ -8,6 +8,7 @@ import type {Block} from '../block.js'; import * as blockAnimation from '../block_animations.js'; import {computeMoveLabel} from '../block_aria_composer.js'; import type {BlockSvg} from '../block_svg.js'; +import { CollapsibleToolboxCategory } from '../blockly.js'; import * as bumpObjects from '../bump_objects.js'; import {config} from '../config.js'; import {Connection} from '../connection.js'; @@ -243,6 +244,25 @@ export class BlockDragStrategy implements IDragStrategy { ) as BlockSvg; eventUtils.setRecordUndo(false); this.positionNewBlock(this.block, newBlock); + + // If the block came from a flyout, collapse open categories to avoid + // weirdness with reopening categories + const selectedCategory = this.block.workspace.targetWorkspace?.getToolbox()?.getSelectedItem(); + if(selectedCategory && selectedCategory.isCollapsible()) { + const collapsibleCategory = selectedCategory as CollapsibleToolboxCategory; + collapsibleCategory.setExpanded(false); + } + + // Code for closing the collapsible category if you drag out a child + // prob don't want this + + // const selectedCategoryParent = selectedCategory?.getParent(); + // //AND the parent opens a flyout-- how do I check for that from here??? + // if(selectedCategoryParent && selectedCategoryParent.isCollapsible()) { + // const collapsibleCategory = selectedCategoryParent as CollapsibleToolboxCategory; + // collapsibleCategory.setExpanded(false); + // } + eventUtils.setRecordUndo(true); return newBlock; diff --git a/packages/blockly/core/toolbox/collapsible_category.ts b/packages/blockly/core/toolbox/collapsible_category.ts index 5048ff1269d..5800d0dc01c 100644 --- a/packages/blockly/core/toolbox/collapsible_category.ts +++ b/packages/blockly/core/toolbox/collapsible_category.ts @@ -237,7 +237,44 @@ export class CollapsibleToolboxCategory } override onClick(_e: Event) { - this.toggleExpanded(); + //TODO: figure out what the behavior should be, then properly refactor + //Separate the logic for category expansion and the flyout + const parentToolbox = this.getParentToolbox(); + const thisFlyoutVisible = parentToolbox.getSelectedItem() === this && parentToolbox.getFlyout()?.isVisible(); + const isExpanded = this.isExpanded(); + + // if expanded && flyout showing, then close both. + if(isExpanded && thisFlyoutVisible) { + this.parentToolbox_.getFlyout()?.setVisible(false); + this.setExpanded(false); + return; + } + + // if expanded && flyout not showing, then just open flyout. + if(isExpanded && !thisFlyoutVisible) { + this.parentToolbox_.getFlyout()?.setVisible(true); + return; + } + + // if not expanded && flyout showing, then just expand OR close flyout??? + // as it currently stands the code makes this one imposssible + if(!isExpanded && thisFlyoutVisible) { + //this.parentToolbox_.getFlyout()?.setVisible(false); + this.setExpanded(true); + return; + } + + // if not expanded && flyout not showing, then open both + if(!isExpanded && !thisFlyoutVisible) { + this.setExpanded(true); + this.parentToolbox_.getFlyout()?.setVisible(true); + return; + } + //this.toggleExpanded(); + } + + toggleFlyout() { + this.parentToolbox_.getFlyout()?.setVisible(false); } /** Toggles whether or not the category is expanded. */ diff --git a/packages/blockly/tests/mocha/toolbox_test.js b/packages/blockly/tests/mocha/toolbox_test.js index 923f08b54e2..622670a9658 100644 --- a/packages/blockly/tests/mocha/toolbox_test.js +++ b/packages/blockly/tests/mocha/toolbox_test.js @@ -261,6 +261,8 @@ suite('Toolbox', function () { sinon.assert.calledOnce(setSelectedSpy); sinon.assert.calledOnce(onClickSpy); }); + //add tests here + }); suite('on key down', function () { From f56a5aa75bba3b0f30903571cb2f9a8c9963e6d5 Mon Sep 17 00:00:00 2001 From: zspriggs Date: Fri, 12 Jun 2026 12:43:11 -0400 Subject: [PATCH 2/7] wip: undo block_drag changes, refactor category changes --- .../core/dragging/block_drag_strategy.ts | 18 ------- .../core/toolbox/collapsible_category.ts | 51 +++++++------------ 2 files changed, 18 insertions(+), 51 deletions(-) diff --git a/packages/blockly/core/dragging/block_drag_strategy.ts b/packages/blockly/core/dragging/block_drag_strategy.ts index 97f73c55b42..1de61fa1abf 100644 --- a/packages/blockly/core/dragging/block_drag_strategy.ts +++ b/packages/blockly/core/dragging/block_drag_strategy.ts @@ -245,24 +245,6 @@ export class BlockDragStrategy implements IDragStrategy { eventUtils.setRecordUndo(false); this.positionNewBlock(this.block, newBlock); - // If the block came from a flyout, collapse open categories to avoid - // weirdness with reopening categories - const selectedCategory = this.block.workspace.targetWorkspace?.getToolbox()?.getSelectedItem(); - if(selectedCategory && selectedCategory.isCollapsible()) { - const collapsibleCategory = selectedCategory as CollapsibleToolboxCategory; - collapsibleCategory.setExpanded(false); - } - - // Code for closing the collapsible category if you drag out a child - // prob don't want this - - // const selectedCategoryParent = selectedCategory?.getParent(); - // //AND the parent opens a flyout-- how do I check for that from here??? - // if(selectedCategoryParent && selectedCategoryParent.isCollapsible()) { - // const collapsibleCategory = selectedCategoryParent as CollapsibleToolboxCategory; - // collapsibleCategory.setExpanded(false); - // } - eventUtils.setRecordUndo(true); return newBlock; diff --git a/packages/blockly/core/toolbox/collapsible_category.ts b/packages/blockly/core/toolbox/collapsible_category.ts index 5800d0dc01c..8741254e2b3 100644 --- a/packages/blockly/core/toolbox/collapsible_category.ts +++ b/packages/blockly/core/toolbox/collapsible_category.ts @@ -237,44 +237,29 @@ export class CollapsibleToolboxCategory } override onClick(_e: Event) { - //TODO: figure out what the behavior should be, then properly refactor - //Separate the logic for category expansion and the flyout - const parentToolbox = this.getParentToolbox(); - const thisFlyoutVisible = parentToolbox.getSelectedItem() === this && parentToolbox.getFlyout()?.isVisible(); - const isExpanded = this.isExpanded(); - - // if expanded && flyout showing, then close both. - if(isExpanded && thisFlyoutVisible) { - this.parentToolbox_.getFlyout()?.setVisible(false); - this.setExpanded(false); - return; - } - - // if expanded && flyout not showing, then just open flyout. - if(isExpanded && !thisFlyoutVisible) { - this.parentToolbox_.getFlyout()?.setVisible(true); - return; - } - - // if not expanded && flyout showing, then just expand OR close flyout??? - // as it currently stands the code makes this one imposssible - if(!isExpanded && thisFlyoutVisible) { - //this.parentToolbox_.getFlyout()?.setVisible(false); - this.setExpanded(true); - return; + // Check for special case where the category has its own flyout items. + if(this.flyoutItems_.length > 0) { + const parentToolbox = this.getParentToolbox(); + const thisFlyoutVisible = + parentToolbox.getSelectedItem() === this && + parentToolbox.getFlyout()?.isVisible(); + + if(this.expanded_ && !thisFlyoutVisible) { + this.toggleFlyout(); + return; + } } - // if not expanded && flyout not showing, then open both - if(!isExpanded && !thisFlyoutVisible) { - this.setExpanded(true); - this.parentToolbox_.getFlyout()?.setVisible(true); - return; - } - //this.toggleExpanded(); + this.toggleExpanded(); } + /** Toggles the parent toolbox's flyout. */ toggleFlyout() { - this.parentToolbox_.getFlyout()?.setVisible(false); + if(this.parentToolbox_.getFlyout()?.isVisible()) { + this.parentToolbox_.getFlyout()?.setVisible(false); + } else { + this.parentToolbox_.getFlyout()?.setVisible(true); + } } /** Toggles whether or not the category is expanded. */ From 6d1e9bed2eba36c7bddf61929034dc8937b5bab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Spriggs?= Date: Fri, 12 Jun 2026 16:14:21 -0400 Subject: [PATCH 3/7] wip: start adding tests --- packages/blockly/tests/mocha/toolbox_test.js | 104 ++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/packages/blockly/tests/mocha/toolbox_test.js b/packages/blockly/tests/mocha/toolbox_test.js index 622670a9658..037abdd517c 100644 --- a/packages/blockly/tests/mocha/toolbox_test.js +++ b/packages/blockly/tests/mocha/toolbox_test.js @@ -261,8 +261,108 @@ suite('Toolbox', function () { sinon.assert.calledOnce(setSelectedSpy); sinon.assert.calledOnce(onClickSpy); }); - //add tests here - + suite('collapsible category with flyout', function () { + setup(function () { + const collapsibleCategoryWithFlyout = { + kind: 'categoryToolbox', + contents: [ + { + kind: 'category', + name: 'Parent', + categorystyle: 'text_category', + contents: [ + { + kind: 'block', + type: 'text', + }, + { + kind: 'category', + name: 'Child', + categorystyle: 'text_category', + contents: [ + { + kind: 'block', + type: 'text_join', + } + ] + } + ] + } + ], + }; + + this.flyoutWorkspace = Blockly.inject(this.div, { + toolbox: collapsibleCategoryWithFlyout, + }); + this.flyoutToolbox = this.flyoutWorkspace.getToolbox(); + this.flyout = this.flyoutToolbox.getFlyout(); + this.parentCategory = this.flyoutToolbox.getToolboxItems()[0]; + }); + + teardown(function () { + this.flyoutWorkspace.dispose(); + }); + + test('collapsed and flyout hidden, click should uncollapse and open flyout', + function () { + assert.isFalse(this.parentCategory.isExpanded()); + assert.isFalse(this.flyout.isVisible()); + + this.parentCategory.onClick(new Event('click')); + + assert.isTrue(this.parentCategory.isExpanded()); + assert.equal( + this.toolbox.getSelectedItem(), + this.parentCategory, + ); + assert.isTrue(this.flyout.isVisible()); + }, + ); + test('expanded and flyout hidden, click should open flyout', + function () { + // First click opens both. + this.parentCategory.onClick(new Event('click')); + + assert.isTrue(this.parentCategory.isExpanded()); + assert.isTrue(this.flyout.isVisible()); + + this.toolbox.setSelectedItem(null); + + assert.isTrue(this.parentCategory.isExpanded()); + assert.isFalse(this.flyout.isVisible()); + + this.parentCategory.onClick(new Event('click')); + + assert.isTrue(this.parentCategory.isExpanded()); + assert.equal( + this.toolbox.getSelectedItem(), + this.parentCategory, + ); + assert.isTrue(this.flyout.isVisible()); + }, + ); + test('expanded and flyout visible, click should collapse and close', + function () { + this.parentCategory.onClick(new Event('click')); + + assert.isTrue(this.parentCategory.isExpanded()); + assert.isTrue(this.flyout.isVisible()); + + this.parentCategory.onClick(new Event('click')); + + assert.isFalse(this.parentCategory.isExpanded()); + assert.notEqual( + this.toolbox.getSelectedItem(), + this.parentCategory, + ); + assert.isFalse(this.flyout.isVisible()); + assert.isTrue(this.flyout.isVisible()); + + }, + ); + + }); + }); }); suite('on key down', function () { From 5d958d2f00185b415b9465db1b4df3b0053bb230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Spriggs?= Date: Mon, 15 Jun 2026 13:46:52 -0400 Subject: [PATCH 4/7] fix: fix collapsible category handling --- .../core/toolbox/collapsible_category.ts | 22 ++--- packages/blockly/tests/mocha/toolbox_test.js | 87 ++++++------------- 2 files changed, 34 insertions(+), 75 deletions(-) diff --git a/packages/blockly/core/toolbox/collapsible_category.ts b/packages/blockly/core/toolbox/collapsible_category.ts index 8741254e2b3..1807cf4b9ea 100644 --- a/packages/blockly/core/toolbox/collapsible_category.ts +++ b/packages/blockly/core/toolbox/collapsible_category.ts @@ -195,7 +195,7 @@ export class CollapsibleToolboxCategory this.subcategoriesDiv_!.style.display = 'block'; this.openIcon_(this.iconDom_); } else { - this.parentToolbox_.getFlyout()?.setVisible(false); + this.setFlyout(false); this.subcategoriesDiv_!.style.display = 'none'; this.closeIcon_(this.iconDom_); } @@ -237,15 +237,15 @@ export class CollapsibleToolboxCategory } override onClick(_e: Event) { - // Check for special case where the category has its own flyout items. - if(this.flyoutItems_.length > 0) { + // Check for special case where the category has its own flyout items. + if (this.flyoutItems_.length > 0) { const parentToolbox = this.getParentToolbox(); - const thisFlyoutVisible = + const thisFlyoutVisible = parentToolbox.getSelectedItem() === this && parentToolbox.getFlyout()?.isVisible(); - if(this.expanded_ && !thisFlyoutVisible) { - this.toggleFlyout(); + if (this.expanded_ && !thisFlyoutVisible) { + this.setFlyout(true); return; } } @@ -253,13 +253,9 @@ export class CollapsibleToolboxCategory this.toggleExpanded(); } - /** Toggles the parent toolbox's flyout. */ - toggleFlyout() { - if(this.parentToolbox_.getFlyout()?.isVisible()) { - this.parentToolbox_.getFlyout()?.setVisible(false); - } else { - this.parentToolbox_.getFlyout()?.setVisible(true); - } + /** Sets the visibility of the parent toolbox's flyout. */ + setFlyout(isVisible: boolean) { + this.parentToolbox_.getFlyout()?.setVisible(isVisible); } /** Toggles whether or not the category is expanded. */ diff --git a/packages/blockly/tests/mocha/toolbox_test.js b/packages/blockly/tests/mocha/toolbox_test.js index 037abdd517c..8c0645e2847 100644 --- a/packages/blockly/tests/mocha/toolbox_test.js +++ b/packages/blockly/tests/mocha/toolbox_test.js @@ -283,84 +283,47 @@ suite('Toolbox', function () { { kind: 'block', type: 'text_join', - } - ] - } - ] - } + }, + ], + }, + ], + }, ], }; - - this.flyoutWorkspace = Blockly.inject(this.div, { - toolbox: collapsibleCategoryWithFlyout, - }); - this.flyoutToolbox = this.flyoutWorkspace.getToolbox(); - this.flyout = this.flyoutToolbox.getFlyout(); - this.parentCategory = this.flyoutToolbox.getToolboxItems()[0]; + this.toolbox.render(collapsibleCategoryWithFlyout); + this.flyout = this.toolbox.getFlyout(); + this.parentCategory = this.toolbox.getToolboxItems()[0]; }); - teardown(function () { - this.flyoutWorkspace.dispose(); - }); - - test('collapsed and flyout hidden, click should uncollapse and open flyout', - function () { - assert.isFalse(this.parentCategory.isExpanded()); - assert.isFalse(this.flyout.isVisible()); - - this.parentCategory.onClick(new Event('click')); - - assert.isTrue(this.parentCategory.isExpanded()); - assert.equal( - this.toolbox.getSelectedItem(), - this.parentCategory, - ); - assert.isTrue(this.flyout.isVisible()); - }, - ); - test('expanded and flyout hidden, click should open flyout', - function () { - // First click opens both. - this.parentCategory.onClick(new Event('click')); - - assert.isTrue(this.parentCategory.isExpanded()); - assert.isTrue(this.flyout.isVisible()); - - this.toolbox.setSelectedItem(null); + test('if category collapsed and flyout hidden, click should uncollapse and open flyout', function () { + this.parentCategory.setExpanded(false); - assert.isTrue(this.parentCategory.isExpanded()); - assert.isFalse(this.flyout.isVisible()); + this.parentCategory.onClick(new Event('click')); + this.toolbox.selectItemByPosition(0); - this.parentCategory.onClick(new Event('click')); + assert.isTrue(this.parentCategory.isExpanded()); + assert.isTrue(this.flyout.isVisible()); + }); + test('if category expanded and flyout hidden, click should open flyout', function () { + this.parentCategory.setExpanded(true); + this.flyout.getWorkspace().hideChaff(); - assert.isTrue(this.parentCategory.isExpanded()); - assert.equal( - this.toolbox.getSelectedItem(), - this.parentCategory, - ); - assert.isTrue(this.flyout.isVisible()); - }, - ); - test('expanded and flyout visible, click should collapse and close', - function () { this.parentCategory.onClick(new Event('click')); + this.toolbox.selectItemByPosition(0); assert.isTrue(this.parentCategory.isExpanded()); assert.isTrue(this.flyout.isVisible()); + }); + test('category expanded and flyout visible, click should collapse and close', function () { + this.parentCategory.setExpanded(true); + this.parentCategory.setFlyout(true); + this.toolbox.selectItemByPosition(0); this.parentCategory.onClick(new Event('click')); + this.parentCategory.getParentToolbox().clearSelection(); assert.isFalse(this.parentCategory.isExpanded()); - assert.notEqual( - this.toolbox.getSelectedItem(), - this.parentCategory, - ); assert.isFalse(this.flyout.isVisible()); - assert.isTrue(this.flyout.isVisible()); - - }, - ); - }); }); }); From f357128667adcf9f425da8bed4b32a870c11d0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Spriggs?= Date: Mon, 15 Jun 2026 15:32:11 -0400 Subject: [PATCH 5/7] remove accidental change --- packages/blockly/core/dragging/block_drag_strategy.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/blockly/core/dragging/block_drag_strategy.ts b/packages/blockly/core/dragging/block_drag_strategy.ts index 1de61fa1abf..b32c59c7ac9 100644 --- a/packages/blockly/core/dragging/block_drag_strategy.ts +++ b/packages/blockly/core/dragging/block_drag_strategy.ts @@ -8,7 +8,6 @@ import type {Block} from '../block.js'; import * as blockAnimation from '../block_animations.js'; import {computeMoveLabel} from '../block_aria_composer.js'; import type {BlockSvg} from '../block_svg.js'; -import { CollapsibleToolboxCategory } from '../blockly.js'; import * as bumpObjects from '../bump_objects.js'; import {config} from '../config.js'; import {Connection} from '../connection.js'; @@ -244,7 +243,6 @@ export class BlockDragStrategy implements IDragStrategy { ) as BlockSvg; eventUtils.setRecordUndo(false); this.positionNewBlock(this.block, newBlock); - eventUtils.setRecordUndo(true); return newBlock; From 4598296ce245029994a7dd63db3bade644e9153b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Spriggs?= Date: Tue, 16 Jun 2026 09:03:46 -0400 Subject: [PATCH 6/7] fix: change to setFlyoutVisible and make private --- packages/blockly/core/toolbox/collapsible_category.ts | 6 +++--- packages/blockly/tests/mocha/toolbox_test.js | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/blockly/core/toolbox/collapsible_category.ts b/packages/blockly/core/toolbox/collapsible_category.ts index 1807cf4b9ea..3418a46fd71 100644 --- a/packages/blockly/core/toolbox/collapsible_category.ts +++ b/packages/blockly/core/toolbox/collapsible_category.ts @@ -195,7 +195,7 @@ export class CollapsibleToolboxCategory this.subcategoriesDiv_!.style.display = 'block'; this.openIcon_(this.iconDom_); } else { - this.setFlyout(false); + this.setFlyoutVisible(false); this.subcategoriesDiv_!.style.display = 'none'; this.closeIcon_(this.iconDom_); } @@ -245,7 +245,7 @@ export class CollapsibleToolboxCategory parentToolbox.getFlyout()?.isVisible(); if (this.expanded_ && !thisFlyoutVisible) { - this.setFlyout(true); + this.setFlyoutVisible(true); return; } } @@ -254,7 +254,7 @@ export class CollapsibleToolboxCategory } /** Sets the visibility of the parent toolbox's flyout. */ - setFlyout(isVisible: boolean) { + private setFlyoutVisible(isVisible: boolean) { this.parentToolbox_.getFlyout()?.setVisible(isVisible); } diff --git a/packages/blockly/tests/mocha/toolbox_test.js b/packages/blockly/tests/mocha/toolbox_test.js index 8c0645e2847..98648455554 100644 --- a/packages/blockly/tests/mocha/toolbox_test.js +++ b/packages/blockly/tests/mocha/toolbox_test.js @@ -306,7 +306,7 @@ suite('Toolbox', function () { }); test('if category expanded and flyout hidden, click should open flyout', function () { this.parentCategory.setExpanded(true); - this.flyout.getWorkspace().hideChaff(); + this.flyout.hide(); this.parentCategory.onClick(new Event('click')); this.toolbox.selectItemByPosition(0); @@ -316,7 +316,6 @@ suite('Toolbox', function () { }); test('category expanded and flyout visible, click should collapse and close', function () { this.parentCategory.setExpanded(true); - this.parentCategory.setFlyout(true); this.toolbox.selectItemByPosition(0); this.parentCategory.onClick(new Event('click')); From b4743db31c77a0ba4608146e2d1ba73465f6b7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Spriggs?= Date: Tue, 16 Jun 2026 12:56:56 -0400 Subject: [PATCH 7/7] fix: better click handling on tests --- packages/blockly/tests/mocha/toolbox_test.js | 22 +++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/blockly/tests/mocha/toolbox_test.js b/packages/blockly/tests/mocha/toolbox_test.js index 98648455554..8f0bb6e2616 100644 --- a/packages/blockly/tests/mocha/toolbox_test.js +++ b/packages/blockly/tests/mocha/toolbox_test.js @@ -294,12 +294,14 @@ suite('Toolbox', function () { this.flyout = this.toolbox.getFlyout(); this.parentCategory = this.toolbox.getToolboxItems()[0]; }); - + function clickCategory(category) { + const target = category.getClickTarget(); + const event = new PointerEvent('pointerdown', {bubbles: true}); + target.dispatchEvent(event); + } test('if category collapsed and flyout hidden, click should uncollapse and open flyout', function () { this.parentCategory.setExpanded(false); - - this.parentCategory.onClick(new Event('click')); - this.toolbox.selectItemByPosition(0); + clickCategory(this.parentCategory); assert.isTrue(this.parentCategory.isExpanded()); assert.isTrue(this.flyout.isVisible()); @@ -307,19 +309,15 @@ suite('Toolbox', function () { test('if category expanded and flyout hidden, click should open flyout', function () { this.parentCategory.setExpanded(true); this.flyout.hide(); - - this.parentCategory.onClick(new Event('click')); - this.toolbox.selectItemByPosition(0); + clickCategory(this.parentCategory); assert.isTrue(this.parentCategory.isExpanded()); assert.isTrue(this.flyout.isVisible()); }); test('category expanded and flyout visible, click should collapse and close', function () { - this.parentCategory.setExpanded(true); - this.toolbox.selectItemByPosition(0); - - this.parentCategory.onClick(new Event('click')); - this.parentCategory.getParentToolbox().clearSelection(); + // Click in to expand, then click again to close + clickCategory(this.parentCategory); + clickCategory(this.parentCategory); assert.isFalse(this.parentCategory.isExpanded()); assert.isFalse(this.flyout.isVisible());