public IEnumerator DraggingChildElementsOfATemplateShouldNotWork()
        {
            AddElementCodeOnly <TextField>();
            AddElementCodeOnly();

            var hierarchyItem = BuilderTestsHelper.GetExplorerItemWithName(hierarchy, nameof(TextField));

            yield return(UIETestHelpers.ExpandTreeViewItem(hierarchyItem));

            yield return(UIETestHelpers.Pause());

            var textField              = viewport.documentRootElement[0];
            var textFieldLabel         = textField.Q <Label>();
            var visualElement          = viewport.documentRootElement[1];
            var textFieldLabelExplorer = BuilderTestsHelper.GetLinkedExplorerItem(textFieldLabel);
            var visualElementExplorer  = BuilderTestsHelper.GetLinkedExplorerItem(visualElement);

            yield return(UIETestEvents.Mouse.SimulateDragAndDrop(builder,
                                                                 visualElementExplorer.worldBound.center,
                                                                 textFieldLabelExplorer.worldBound.center));

            Assert.That(visualElement.parent, Is.EqualTo(viewport.documentRootElement));

            yield return(UIETestEvents.Mouse.SimulateDragAndDrop(builder,
                                                                 textFieldLabelExplorer.worldBound.center,
                                                                 visualElementExplorer.worldBound.center));

            Assert.That(textFieldLabel.parent, Is.EqualTo(textField));
        }
        public IEnumerator CSharpTypeTemplateChildrenMustBeGrayedOutAndNotEditable()
        {
            AddElementCodeOnly <TextField>();
            var hierarchyItem = BuilderTestsHelper.GetExplorerItemWithName(hierarchy, nameof(TextField));

            yield return(UIETestHelpers.ExpandTreeViewItem(hierarchyItem));

            var textFieldDocumentElement = GetFirstDocumentElement();

            Assert.That(textFieldDocumentElement.childCount, Is.GreaterThan(0));
            BuilderExplorerItem lastChild = null;

            foreach (var child in textFieldDocumentElement.Children())
            {
                lastChild = BuilderTestsHelper.GetLinkedExplorerItem(child);
                Assert.That(lastChild.row().classList, Contains.Item(BuilderConstants.ExplorerItemHiddenClassName));
            }

            yield return(UIETestEvents.Mouse.SimulateClick(lastChild));

            inspector.Query <ToggleButtonStrip>().ForEach(toggleButtonStrip =>
            {
                Assert.That(toggleButtonStrip.enabledInHierarchy, Is.False);
            });

            inspector.Query <PercentSlider>().ForEach(percentSlider =>
            {
                Assert.That(percentSlider.enabledInHierarchy, Is.False);
            });
        }