Merge pull request #1026 from geosharath/VMSS

CP-17752: make unit tests use a generic class of policy wizard and
This commit is contained in:
Mihaela Stoica 2016-06-14 17:08:08 +01:00 committed by GitHub
commit 3cbc9332e6
3 changed files with 35 additions and 7 deletions

View File

@ -657,6 +657,24 @@
<data name="NewPolicyWizard_VirtualMachinesPane" xml:space="preserve"> <data name="NewPolicyWizard_VirtualMachinesPane" xml:space="preserve">
<value>6535</value> <value>6535</value>
</data> </data>
<data name="NewPolicyWizardVMSS_EmailalertsPane" xml:space="preserve">
<value>6551</value>
</data>
<data name="NewPolicyWizardVMSS_FinishPane" xml:space="preserve">
<value>6551</value>
</data>
<data name="NewPolicyWizardVMSS_PolicyNamePane" xml:space="preserve">
<value>6551</value>
</data>
<data name="NewPolicyWizardVMSS_SnapshotfrequencyPane" xml:space="preserve">
<value>6551</value>
</data>
<data name="NewPolicyWizardVMSS_SnapshottypePane" xml:space="preserve">
<value>6551</value>
</data>
<data name="NewPolicyWizardVMSS_VMsPane" xml:space="preserve">
<value>6551</value>
</data>
<data name="NewPoolDialog" xml:space="preserve"> <data name="NewPoolDialog" xml:space="preserve">
<value>5100</value> <value>5100</value>
</data> </data>

View File

@ -261,8 +261,18 @@ namespace XenAdmin.Wizards.NewPolicyWizard
protected override string WizardPaneHelpID() protected override string WizardPaneHelpID()
{ {
return CurrentStepTabPage is RBACWarningPage ? FormatHelpId("Rbac") : base.WizardPaneHelpID(); if (CurrentStepTabPage is RBACWarningPage)
{
return FormatHelpId("Rbac");
}
else if (!VMGroup<T>.isVMPolicyVMPP)
{
return "NewPolicyWizardVMSS_" + CurrentStepTabPage.HelpID + "Pane";
}
return "NewPolicyWizard_" + CurrentStepTabPage.HelpID + "Pane";
} }
} }
} }

View File

@ -38,16 +38,16 @@ namespace XenAdminTests.WizardTests.cowleyPolicies_xml
{ {
[TestFixture, Category(TestCategories.UICategoryB)] [TestFixture, Category(TestCategories.UICategoryB)]
class NewPolicyWizardTest : WizardTest<NewPolicyWizard> class NewPolicyWizardTest : WizardTest<NewPolicyWizardSpecific<XenAPI.VMPP>>
{ {
public NewPolicyWizardTest() public NewPolicyWizardSpecific()
: base(new string[] { "Policy Name", "Protected VMs", "Snapshot Type", "Snapshot Schedule","Archive Options","Email Alerts","Finish" } : base(new string[] { "Policy Name", "Protected VMs", "Snapshot Type", "Snapshot schedule","Archive Options","Email Alerts","Finish" }
, true, false) , true, false)
{ } { }
protected override NewPolicyWizard NewWizard() protected override NewPolicyWizardSpecific<XenAPI.VMPP> NewWizard()
{ {
return new NewPolicyWizard(base.GetAnyPool()); return new NewPolicyWizardSpecific<XenAPI.VMPP>(base.GetAnyPool());
} }
protected override void TestPage(string pageName) protected override void TestPage(string pageName)