Пример #1
0
        public void AssociateThenCancel(AssociateTagData input)
        {
            //navigate and select node
            AssociateOnWhichNode(input);

            Association.ClickAssociateTagButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();

            //Do not select tag and click "Cancel" button directly
            Association.ClickCancelButton();
            TimeManager.ShortPause();

            //verify go back to the previous page
            Assert.IsTrue(Association.IsAssociateTagButtonDisplayed());

            //Select 2 tags and cancel
            Association.ClickAssociateTagButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            Association.CheckedTags(input.InputData.TagNames);
            Association.ClickCancelButton();
            TimeManager.ShortPause();

            //verify go back to the previous page
            Assert.IsTrue(Association.IsAssociateTagButtonDisplayed());
        }
Пример #2
0
        public void DisassociateTagWhileOnAssociatingTagsPage(AssociateTagData input)
        {
            //Select one hierarchy node.
            AssociateSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            //Click  '关联数据点'  button.
            AssociateSettings.ClickAssociateTagButton();

            //Select some tags
            AssociateSettings.CheckedTags(input.InputData.TagNames);
            TimeManager.ShortPause();

            //The tags can be display in 已选数据点.
            foreach (string tagName in input.InputData.TagNames)
            {
                Assert.IsTrue(AssociateSettings.IsRemoveTagExisted(tagName));
            }

            //Click 关联状态 button.可关联 checkbox is checked and all the available tag is list.
            Assert.IsTrue(AssociateSettings.IsCheckedAssociated(input.InputData.HeaderName[0]));
            Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagName));

            //Check 不可关联 checkbox.
            AssociateSettings.OnlyCheckDisassociatedCheckbox();
            TimeManager.LongPause();

            //• Loading icon appear and check box is gray and cannot be select.
            AssociateSettings.IsAllTagsDisabled();
            Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.ExpectedData.TagName));

            //Click 解除关联 button in one tag which is associatied with one node.
            AssociateSettings.FocusOnTag(input.ExpectedData.TagName);
            TimeManager.ShortPause();
            AssociateSettings.ClickDisassociateButton(input.ExpectedData.TagName);
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.MediumPause();

            //Select checkbox of the tag disassociated in step6
            //Check 可关联 checkbox again.
            AssociateSettings.OnlyCheckAssociatedCheckbox();
            TimeManager.LongPause();

            AssociateSettings.CheckedTag(input.ExpectedData.TagName);
            TimeManager.ShortPause();

            //The tag is displayed in '已选数据点' as well.
            Assert.IsTrue(AssociateSettings.IsRemoveTagExisted(input.ExpectedData.TagName));

            //Refresh the tag list or switch to other pages then switch back. The tag which was dissociated in step6 disappeared from '不可关联' list now.
            //Check 不可关联 checkbox.
            AssociateSettings.OnlyCheckDisassociatedCheckbox();
            TimeManager.LongPause();
            Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.ExpectedData.TagName));

            //Click 关联 button.
            AssociateSettings.ClickAssociateButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.MediumPause();
            Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.ExpectedData.TagName));
            Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[0]));
        }