public void ChangePrivacyToOnlyOwner() { var results = new UITestHelper(metlWindow); results.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_CONVERSATION_SEARCH_RESULTS)); results.WaitForControlCondition((uiControl) => { return Rect.Empty.Equals(uiControl.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty)); }); var editConversation = new ConversationEditScreen(results.AutomationElement); editConversation.ChangeGroup(TestConstants.OWNER_USERNAME).Save().ReturnToCurrent(); }
public void PrivacyIsSetToUnrestricted() { var results = new UITestHelper(metlWindow); results.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_CONVERSATION_SEARCH_RESULTS)); results.OverrideTimeout = 5000; results.WaitForControlCondition((uiControl) => { return Rect.Empty.Equals(uiControl.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty)); }); var editConversation = new ConversationEditScreen(results.AutomationElement); bool selected = false; editConversation.IsGroupSelected(TestConstants.AUTH_GROUP_UNRESTRICTED, out selected).Save().ReturnToCurrent(); Assert.IsTrue(selected, ErrorMessages.EXPECTED_SET_PRIVACY); }
public void AddPageToConversation() { var slideDisplay = new UITestHelper(metlWindow, metlWindow.AutomationElement.Descendant(typeof(SlideDisplay))); var rangeValue = slideDisplay.AutomationElement.GetCurrentPattern(RangeValuePattern.Pattern) as RangeValuePattern; var currentCount = rangeValue.Current.Maximum; var navi = new SlideNavigation(metlWindow.AutomationElement); navi.Add(); slideDisplay.WaitForControlCondition((uiControl) => { var range = uiControl.GetCurrentPattern(RangeValuePattern.Pattern) as RangeValuePattern; return range.Current.Maximum == currentCount; }); Assert.AreEqual(currentCount + 1, rangeValue.Current.Maximum); }
public void DeleteCurrentConversation() { var results = new UITestHelper(metlWindow); results.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_CONVERSATION_SEARCH_RESULTS)); results.WaitForControlCondition((uiControl) => { return Rect.Empty.Equals(uiControl.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty)); }); var editConversation = new ConversationEditScreen(results.AutomationElement); editConversation.Delete(); }
public void SearchForHavePermissionAndJoin() { var search = new ConversationSearcher(metlWindow.AutomationElement); search.searchField(TestConstants.NONOWNER_CONVERSATION_TITLE); search.Search(); var results = new UITestHelper(metlWindow); results.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_CONVERSATION_SEARCH_RESULTS)); results.WaitForControlCondition((uiControl) => { return Rect.Empty.Equals(uiControl.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty)); }); search.JoinQueried(TestConstants.NONOWNER_CONVERSATION_TITLE); }
public void SearchForDeletedConversation() { var search = new ConversationSearcher(metlWindow.AutomationElement); search.searchField(TestConstants.DELETED_CONVERSATION_TITLE); search.Search(); var results = new UITestHelper(metlWindow); results.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_CONVERSATION_SEARCH_RESULTS)); results.WaitForControlCondition((uiControl) => { return Rect.Empty.Equals(uiControl.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty)); }); var success = search.IsEmptyResult(); Assert.IsTrue(success, ErrorMessages.EXPECTED_NO_RESULTS); }
public void SwitchToSearchMyConversations() { new ApplicationPopup(metlWindow.AutomationElement).SearchMyConversation(); var filter = new UITestHelper(metlWindow); filter.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_SEARCH_ALL_CONVERSATIONS_BUTTON)); var success = filter.WaitForControlVisible(); Assert.IsTrue(success, ErrorMessages.WAIT_FOR_CONTROL_FAILED); var filterButton = filter.AutomationElement; Assert.AreEqual("Filter my Conversations", filterButton.Current.Name, ErrorMessages.EXPECTED_CONTENT); var results = new UITestHelper(metlWindow); results.SearchProperties.Add(new PropertyExpression(AutomationElement.AutomationIdProperty, Constants.ID_METL_CONVERSATION_SEARCH_RESULTS)); results.WaitForControlCondition((uiControl) => { return Rect.Empty.Equals(uiControl.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty)); }); }