示例#1
0
        private void CheckLabels(bool isItemLocked)
        {
            var selectedActivity = Actor.AttemptsTo(Select.WorkflowActivity(planningActivity));
            var expectedLabel    = isItemLocked ? planningActivity.Name : planningActivity.Label;

            CheckLabelOfElement(selectedActivity, expectedLabel);

            var selectedPath = Actor.AttemptsTo(Select.WorkflowPath(confirmPath));

            expectedLabel = isItemLocked ? confirmPath.Name : confirmPath.Label;
            CheckLabelOfElement(selectedPath, expectedLabel);
        }
示例#2
0
        public void S_1_009_WorkflowTest()
        {
            //Precondition:
            Actor.AttemptsTo(
                Open.NavigationPanel,
                Pin.NavigationPanel
                );

            //Scenario:
            //a - b
            Actor.AttemptsTo(Create.Item.OfItemType("Administration/Workflow Map").BySecondaryMenu());

            //c
            Actor.AttemptsTo(Fill.WorkflowMapProperties.With(workflowMap));

            Actor.AttemptsTo(Move.WorkflowActivity(endActivity).Into(600, 20));

            //d - h
            var selectedPath     = Actor.AttemptsTo(Select.WorkflowPath(defaultPath));
            var selectedPathLine = Actor.AsksFor(Children.Of(selectedPath).Located(By.XPath("./*"))).First();

            Actor.ChecksThat(HtmlAttribute.Of(selectedPathLine).Named("stroke"), Is.EqualTo("rgb(255, 0, 0)"));

            Actor.AttemptsTo(Add.WorkflowActivity(planningActivity).IntoWorkflowPath(defaultPath).AndFillProperties);
            var relationshipsPanel = Actor.AsksFor(WorkflowPageContent.RelationshipsPanel);

            Actor.AttemptsTo(Create.Relationship.InRelationshipsPanel(relationshipsPanel).ViaSelectItems(assignmentCriteria).ByDoubleClick);
            CheckRelationship();

            Actor.AttemptsTo(Add.WorkflowActivity(confirmingActivity).IntoWorkflowPath(intermediatePath).AndFillProperties);

            //i - j
            Actor.AttemptsTo(Select.WorkflowPath(confirmPath));
            Actor.AttemptsTo(Fill.WorkflowPathProperties.With(confirmPath));

            Actor.AttemptsTo(Select.WorkflowPath(finishPath));
            Actor.AttemptsTo(Fill.WorkflowPathProperties.With(finishPath));

            CheckLabels(true);

            //k
            Actor.AttemptsTo(Save.OpenedItem.BySaveUnlockAndCloseButton);

            //l
            Actor.AttemptsTo(
                Open.SearchPanel.OfCurrentItemType.BySelectedSecondaryMenu,
                Search.Simple.InMainGrid.With(workflowSearchCriteria),
                Open.Item.InMainGrid.WithRowNumber(1).ByContextMenu.ForView
                );

            //l.i
            var savedData = Actor.AsksFor(WorkflowPageState.SavedData);

            Actor.ChecksThat(savedData.Label, Is.EqualTo(workflowMap.Label), "Label is equal to expected");
            Actor.ChecksThat(savedData.Description, Is.EqualTo(workflowMap.Description), "Description is equal to expected");
            Actor.ChecksThat(savedData.Name, Is.EqualTo(workflowMap.Name), "Name is equal to expected");
            Actor.ChecksThat(savedData.ProcessOwner, Is.EqualTo(workflowMap.ProcessOwner), "Process Owner is equal to expected");

            Actor.ChecksThat(savedData.Activities, Is.EqualTo(workflowMap.Activities), "Activities are equal to expected");
            Actor.ChecksThat(savedData.Paths, Is.EqualTo(workflowMap.Paths), "Paths are equal to expected");

            CheckLabels(false);

            Actor.AttemptsTo(Select.WorkflowActivity(planningActivity));
            CheckRelationship();

            //m
            Actor.AttemptsTo(
                Close.ActiveItemPage.ByCloseButton,
                Collapse.SecondaryMenu
                );
        }