예제 #1
0
        private void CheckRelationship()
        {
            var relationshipsPanel = Actor.AsksFor(WorkflowPageContent.RelationshipsPanel);
            var relationship       = Actor.AsksFor(RelationshipsPanelContent.CurrentRelationship(relationshipsPanel));

            Actor.AttemptsTo(Wait.UntilQuestionIsAnswered(RelationshipGridState.RowsCount(relationship), x => x != 0).
                             WithTimeout(TimeSpan.FromSeconds(25)).
                             WithSleepInterval(TimeSpan.FromMilliseconds(500)));

            Actor.ChecksThat(RelationshipGridState.Unfrozen.CellValue(relationship, 1, identityNameLabel), Is.EqualTo(assignmentCriteria[identityNameLabel]));
            Actor.ChecksThat(RelationshipGridState.Unfrozen.CellValue(relationship, 1, votingWeightLabel), Is.EqualTo("100"));
        }
예제 #2
0
        public void S_1_005_ListsTest()
        {
            //Precondition:
            Actor.AttemptsTo(Open.NavigationPanel);
            Actor.AttemptsTo(Pin.NavigationPanel);

            //1
            //a, b
            Actor.AttemptsTo(Create.Item.OfItemType("Administration/List").BySecondaryMenu());

            //i
            var form = Actor.AsksFor(ItemPageContent.Form);

            Actor.AttemptsTo(
                Set.NewValue(listName).ForProperty(PropertyName).OnForm(form),
                Set.NewValue(listDescription).ForProperty(PropertyDescription).OnForm(form)
                );

            //j
            var relationshipsPanel = Actor.AsksFor(ItemPageContent.RelationshipsPanel);

            Actor.AttemptsTo(Select.RelationshipTab.WithName(tabValueName).InRelationshipsPanel(relationshipsPanel));

            var relationship = Actor.AsksFor(ItemPageContent.CurrentRelationship);

            for (var i = 0; i < gridValues.Count; i++)
            {
                Actor.AttemptsTo(Create.Relationship.InRelationshipsPanel(relationshipsPanel).ViaAddRow());
            }

            //k
            for (var i = 0; i < gridValues.Count; i++)
            {
                Actor.AttemptsTo(Select.Item.InRelationshipGrid(relationship).WithRowNumber(i + 1));
                Actor.AttemptsTo(Set.NewValue(gridValues[i][columnLabelName]).ForStringPropertyInCell(i + 1, columnLabelName).OfRelationshipGrid(relationshipsPanel));
                Actor.AttemptsTo(Set.NewValue(gridValues[i][columnValueName]).ForStringPropertyInCell(i + 1, columnValueName).OfRelationshipGrid(relationshipsPanel));
            }

            //l
            Actor.AttemptsTo(Save.OpenedItem.BySaveButton);

            for (var i = 0; i < gridValues.Count; i++)
            {
                Actor.ChecksThat(RelationshipGridState.Unfrozen.CellValue(relationship, i + 1, columnSortOrderName), Is.EqualTo(gridValues[i][columnSortOrderName]));
            }

            Actor.ChecksThat(RelationshipGridState.GridData(relationship), Is.EquivalentTo(gridValues));

            Actor.AttemptsTo(
                Save.OpenedItem.ByDoneButton(),
                Close.ActiveItemPage.ByCloseButton
                );

            //m
            Actor.AttemptsTo(
                Open.SearchPanel.OfCurrentItemType.BySelectedSecondaryMenu,
                Search.Simple.InMainGrid.With(new Dictionary <string, string> {
                [columnName] = listName
            }),
                Open.Item.InMainGrid.WithRowNumber(1).ByDoubleClick
                );

            Actor.ChecksThat(ItemPageState.FieldValue(PropertyName), Is.EqualTo(listName));
            Actor.ChecksThat(ItemPageState.FieldValue(PropertyDescription), Is.EqualTo(listDescription));
            Actor.ChecksThat(RelationshipGridState.GridData(relationship), Is.EquivalentTo(gridValues));

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