CP-13034: Fix Update wizard tests, after changes to the Select Update page

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2015-07-16 13:11:59 +01:00
parent f523fe52eb
commit cef47b797d

View File

@ -63,12 +63,24 @@ namespace XenAdminTests.WizardTests.updatesState_xml
{
DataGridView dataGrid = TestUtils.GetDataGridView(wizard, "PatchingWizard_SelectPatchPage.dataGridViewPatches");
MW(dataGrid.Select);
MW(() => dataGrid.Rows[dataGrid.Rows.Count - 1].Selected = true);
if (dataGrid.Rows.Count > 0)
MW(() => dataGrid.Rows[dataGrid.Rows.Count - 1].Selected = true);
else
{
MW(TestUtils.GetRadioButton(wizard, "PatchingWizard_SelectPatchPage.selectFromDiskRadioButton").Select);
MW(() => TestUtils.GetTextBox(wizard, "PatchingWizard_SelectPatchPage.fileNameTextBox").Text =
TestResource("succeed.xsupdate"));
}
}
else if (pageName == "Select Servers")
{
MW(TestUtils.GetButton(wizard, "PatchingWizard_SelectServers.buttonSelectAll").PerformClick);
}
else if (pageName == "Upload")
{
while (!btnNext.Enabled)
Thread.Sleep(1000);
}
else if (pageName == "Prechecks")
{
while (!btnNext.Enabled)