mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Corrected test code selecting a node on the main treeview.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
09e8b8ee5c
commit
4289972b1b
@ -81,15 +81,15 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
|
|
||||||
// The easiest way to generate the context menu is to call TreeView_NodeMouseClick_ ourselves.
|
// The easiest way to generate the context menu is to call TreeView_NodeMouseClick_ ourselves.
|
||||||
// So construct fake click event data.
|
// So construct fake click event data.
|
||||||
VirtualTreeNode node = FindInTree(ixmo);
|
Assert.IsTrue(SelectInTree(ixmo), "Couldn't find a node for " + ixmoString + " in the tree");
|
||||||
Assert.IsNotNull(node, "Couldn't find a node for " + ixmoString + " in the tree");
|
|
||||||
VirtualTreeNodeMouseClickEventArgs e = new VirtualTreeNodeMouseClickEventArgs(node, MouseButtons.Right, 1, 0, 0);
|
|
||||||
|
|
||||||
// Generate the TreeContextMenu
|
// Generate the TreeContextMenu
|
||||||
|
|
||||||
MW(() =>
|
MW(() =>
|
||||||
{
|
{
|
||||||
node.EnsureVisible();
|
var tree = TestUtils.GetFlickerFreeTreeView(MainWindowWrapper.Item, "navigationPane.navigationView.treeView");
|
||||||
|
var e = new VirtualTreeNodeMouseClickEventArgs(tree.SelectedNode, MouseButtons.Right, 1, 0, 0);
|
||||||
var view = TestUtils.GetNavigationView(MainWindowWrapper.Item, "navigationPane.navigationView");
|
var view = TestUtils.GetNavigationView(MainWindowWrapper.Item, "navigationPane.navigationView");
|
||||||
TestUtils.ExecuteMethod(view, "HandleNodeRightClick", new object[] { e });
|
TestUtils.ExecuteMethod(view, "HandleNodeRightClick", new object[] { e });
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user