public void TestSearcherDoesntUpdateWhenTagsChangeOnUnsearchableObject() { MW(() => EditSearchButton.PerformClick()); // select Tags for the query type MWWaitFor(() => QueryTypeComboButton.SelectItem <QueryElement.QueryType>(qt => qt.ToString() == "Tags"), "Couldn't select Tags"); string newTag = Guid.NewGuid().ToString(); // add a new tag to the object. Tags.AddTag(GetAnyVBD(), newTag); // now check that this new tag has not been added to the searcher. MWWaitFor(() => null == ComboButton.Items.Find(ts => ts.Text == newTag), "New tag added to the Searcher with VBD selected."); }
public void TestSearcherUpdatesWhenCustomFieldsChange() { MW(() => EditSearchButton.PerformClick()); // create a new custom field string newCustomField = Guid.NewGuid().ToString(); VM vm = GetAnyVM(); CustomFieldsManager.AddCustomField(vm.Connection.Session, vm.Connection, new CustomFieldDefinition(newCustomField, CustomFieldDefinition.Types.String)); // now see if this new custom field has been added to the searcher. MWWaitFor(delegate { // need to click for repopulate. QueryTypeComboButton.PerformClick(); return(null != QueryTypeComboButton.Items.Find(ts => ts.Text == newCustomField)); }, "New custom field not added to the Searcher."); }
public void TestSearcherUpdatesWhenTagsChange() { MW(() => EditSearchButton.PerformClick()); // now test that the filter-value combo updates when the tags change for each of these objects. foreach (IXenObject xenObject in new IXenObject[] { GetAnyHost(), GetAnyNetwork(), GetAnyPool(), GetAnySR(), GetAnyVM() }) { // select Tags for the query type MWWaitFor(() => QueryTypeComboButton.SelectItem <QueryElement.QueryType>(qt => qt.ToString() == "Tags"), "Couldn't select Tags"); string newTag = Guid.NewGuid().ToString(); // add a new tag to the object. Tags.AddTag(xenObject, newTag); // now see if this new tag has been added to the searcher. MWWaitFor(() => null != ComboButton.Items.Find(ts => ts.Text == newTag), "New tag not added to the Searcher with " + xenObject.GetType() + " selected."); } }