public void S_1_016_PromoteAnObjectTest() { // precondition, 2a OpenNavAndSelectChairs(); //2.b Actor.AttemptsTo(Set.PreviewMode(PreviewMode.Properties).InMainGrid); var propertiesPanel = Actor.AsksFor(SearchPanelContent.PropertiesPanel); Actor.ChecksThat(Displayed.Of(propertiesPanel), Is.True); //3. Promote item //a Actor.AttemptsTo(Select.Item.InMainGrid.WithValueInColumn(columnLabel, woodType)); Actor.ChecksThat(PropertiesPanelState.ValueOfProperty(PropertyType.State, propertiesPanel), Is.EqualTo("Start")); Actor.ChecksThat(PropertiesPanelState.Title(propertiesPanel), Is.EqualTo(propertiesPanelTitle)); //b,c,d PromoteTo(confirmingState); Actor.ChecksThat(PropertiesPanelState.ValueOfProperty(PropertyType.State, propertiesPanel), Is.EqualTo(confirmingState)); //e,f TryToPromoteAndLogout(); //g Actor.AttemptsTo(LogIn.ToInnovator.As(Actor2.ActorInfo)); //h, i OpenNavAndSelectChairs(); var dialogContainer = Actor.AsksFor(SearchPanelContent.DialogsContainer); //j, k, l Actor.AttemptsTo(Open.Dialog.Promote.ForItem.WithValue(woodType).InMainGridColumn(columnLabel).ByContextMenu); Actor.ChecksThat(TextContent.Of(PromoteDialogElements.Title(dialogContainer)), x => x.Contains(promoteDialogTitle)); Actor.AttemptsTo(Select.PromoteState.WithValue(creatingState).InDialog(dialogContainer).ByDoubleClick); //m, n var rowNumber = Actor.AsksFor(MainGridState.IndexOfSelectedRow); Actor.AttemptsTo(Open.Dialog.Properties.FromMainGrid.ByContextMenuOnRow(rowNumber)); propertiesPanel = PropertiesDialogElements.PropertiesPanel(dialogContainer); Actor.ChecksThat(PropertiesPanelState.ValueOfProperty(PropertyType.State, propertiesPanel), Is.EqualTo(creatingState)); Actor.AttemptsTo(Close.Dialog(dialogContainer).ByCloseButton); //o, p TryToPromoteAndLogout(); //q Actor.AttemptsTo(LogIn.ToInnovator.As(Actor.ActorInfo)); //r, s OpenNavAndSelectChairs(); //t, u, v Actor.AttemptsTo(Select.Item.InMainGrid.WithValueInColumn(columnLabel, woodType)); PromoteTo(completedState); Actor.AttemptsTo(Set.PreviewMode(PreviewMode.Properties).InMainGrid); propertiesPanel = Actor.AsksFor(SearchPanelContent.PropertiesPanel); Actor.ChecksThat(PropertiesPanelState.ValueOfProperty(PropertyType.State, propertiesPanel), Is.EqualTo(completedState)); }
public void S_1_017_ApplyWorkflowTest() { //TODO delete this after issue IR-077818 "Some columns aren't displayed multilingual label in InBasket" will be fixed if (localeLabel.Equals("ja") || localeLabel.Equals("fr")) { planningActivityLabel = "S_017_Planning"; } //b, f Actor.AttemptsTo( Open.NavigationPanel, Pin.NavigationPanel, Open.SearchPanel.OfTocItemWithPath("S1017 Chair").ByLoupeIcon, Clear.SearchCriteria.InMainGrid, Search.WithCurrentSearchCriteria.InMainGrid); //g, h var rowNumber = Actor.AsksFor( MainGridState.Unfrozen.IndexOfRowByValueInColumn(DateTime.Today.ToShortInnovatorDateString(Settings.CultureInfo), dateCreatedLabel + " [...]")); var dialogContainer = Actor.AsksFor(SearchPanelContent.DialogsContainer); Actor.AttemptsTo( Open.Dialog.Properties.FromMainGrid.ByContextMenuOnRow(rowNumber), Click.On(PropertiesDialogElements.CopyIdButton(dialogContainer)), Close.Dialog(dialogContainer).ByCloseButton); //i //Now this test is failed here because of I-002119 "Translations of the same resources are different in dif. places" Actor.AttemptsTo( Open.SearchPanel.OfTocItemWithPath(inBasketTocPath).ByLoupeIcon); //j-n Actor.AttemptsTo(Open.Dialog.WfActivityCompletion.FromMainGrid.ForActivityWithLabel(planningActivityLabel). ByContextMenu); var dialogTitle = Actor.AsksFor( LocaleState.LabelOf.DialogTitle(LocaleKeys.Innovator.Dialog.WfActivityCompletion.Title)); Actor.ChecksThat(WfActivityCompletionDialogState.Title(dialogContainer), Is.EqualTo(dialogTitle)); Actor.AttemptsTo(Set.VotingTo(confirmPathLabel).InActivityCompletionDialog(dialogContainer), Set.Comment(votingComment).InActivityCompletionDialog(dialogContainer), Click.On(WfActivityCompletionDialogElements.CompleteButton(dialogContainer))); expectedReport.ActivityItems.ElementAt(0).WhenVoted = DateTime.Now; Actor.ChecksThat(MainGridState.VisibleRowsCount, Is.EqualTo(0)); //o, p, q, r Actor.AttemptsTo( LogOut.FromInnovator, LogIn.ToInnovator.As(Actor2.ActorInfo), Open.NavigationPanel, Pin.NavigationPanel, Open.SearchPanel.OfTocItemWithPath(inBasketTocPath).ByLoupeIcon); //s var columnActivityLabel = Actor.AsksFor(LocaleState.LabelOf.GridColumn(sourceItemTypeName, "name")); var columnAssignedToLabel = string.Concat(Actor.AsksFor(LocaleState.LabelOf.GridColumn(sourceItemTypeName, "assigned_to")), " [...]"); var searchForConfirming = new Dictionary <string, string> { [columnActivityLabel] = confirmingActivityName, [columnAssignedToLabel] = Actor2.ActorInfo.LoginName }; Actor.AttemptsTo( Clear.SearchCriteria.InMainGrid, Search.Simple.InMainGrid.With(searchForConfirming)); //t var columnSourceItemLabel = Actor.AsksFor(LocaleState.LabelOf.GridColumn(sourceItemTypeName, "container")); var columnNumber = Actor.AsksFor(MainGridState.Unfrozen.IndexOfColumn(columnSourceItemLabel)); Actor.AttemptsTo(Open.Dialog.WfProcess.FromMainGrid.ByLinkInCell(1, columnNumber)); dialogContainer = Actor.AsksFor(SearchPanelContent.DialogsContainer); var mapEditor = WfProcessDialogElements.MapEditor(dialogContainer); Actor.ChecksThat(MapEditorState.YellowHighlightedElement(mapEditor), wfActivity => Assert.AreEqual(wfActivity.Label, confirmingActivityName)); //u Actor.AttemptsTo( Click.On(WfProcessDialogElements.ViewSignOffsButton(dialogContainer)), Close.Dialog(dialogContainer).ByCloseButton); var currentPageContainer = Actor.AsksFor(PagesContent.CurrentPageContainer); Actor.ChecksThat(WfHistoryPanelState.WorkflowHistoryReport(currentPageContainer), report => Assert.AreEqual(expectedReport, report)); //v Actor.AttemptsTo(Close.Tab.Current); //w, x, y Actor.AttemptsTo( Clear.SearchCriteria.InMainGrid, Search.WithCurrentSearchCriteria.InMainGrid, Complete.Activity.WithLabel(confirmingActivityName).VotingTo(finishVote).ByContextMenu); Actor.ChecksThat( MainGridState.Unfrozen.HasItemWithValueInColumn(Actor2.ActorInfo.LoginName, columnAssignedToLabel), Is.False); //z Actor.AttemptsTo(Close.Tab.Current); }