public void DeleteIndustryBenchmarkValid(IndustryBenchmarkData input) { //Click a benchmark(行业=酒店; 区域=全部地区+严寒地区A区 ) from list and click 删除 button. //·Pop up window show 是否删除. TimeManager.LongPause(); TimeManager.LongPause(); IndustryBenchmarkSetting.FocusOnBenchMark(input.InputData.Industry); IndustryBenchmarkSetting.ClickDeleteBenchMark(); //After click confirmation 确定 button.Delete benchmark successfully. JazzMessageBox.MessageBox.Delete(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //· Deleted benchmark can't display in benchmark list correctly. Assert.IsFalse(IndustryBenchmarkSetting.IsRowExistBenchMarkList(input.InputData.Industry)); //Click +行业对标 buttons. IndustryBenchmarkSetting.ClickAddBenchMark(); //Select 行业=酒店 and check 区域=全部地区+严寒地区A区. Click Save button. IndustryBenchmarkSetting.SelectIndustryCombox(input.InputData.Industry); Assert.AreEqual(input.InputData.Industry, IndustryBenchmarkSetting.GetSelectedIndustry()); IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[0]); IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[1]); IndustryBenchmarkSetting.ClickSaveBenchMark(); //· The benchmark the same as deleted one save to menchmark list successfully. IndustryBenchmarkSetting.IsRowExistBenchMarkList(input.InputData.Industry); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[0])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[1])); }
public void ModifyIndustryBenchmarkValid(IndustryBenchmarkData input) { //Industry. Click a benchmark(行业=酒店; 区域=全部地区+严寒地区A区 ) from list and click 修改 button. IndustryBenchmarkSetting.FocusOnBenchMark(input.InputData.Industry); IndustryBenchmarkSetting.ClickModifyBenchMark(); TimeManager.ShortPause(); //· The benchmark combox is gray and can't not be modified. //· The benchmark combox display the correct industry. //· All the checked and unchecked 区域 display in modify mode. Assert.IsFalse(IndustryBenchmarkSetting.IsIndustryComboxEnabled()); Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsDisplay(input.InputData.ClimaticRegions)); Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsDisplay(input.ExpectedData.ClimaticRegions)); //Check some 区域=温和地区;uncheck some 区域=全部地区 checkbox. Click Save button. IndustryBenchmarkSetting.CheckClimateRegion(input.ExpectedData.ClimaticRegions[4]); IndustryBenchmarkSetting.UnCheckClimateRegion(input.InputData.ClimaticRegions[0]); IndustryBenchmarkSetting.ClickSaveBenchMark(); TimeManager.ShortPause(); //· The modified benchmark save to benchmark list successfully. //· The 行业 is gray out and can't be modified. Assert.IsFalse(IndustryBenchmarkSetting.IsIndustryComboxEnabled()); //Click the modified menchmark from list. //Go to view status and the 行业=通讯 and checked 区域=温和地区+严寒地区A区 display. Assert.AreEqual(input.InputData.Industry, IndustryBenchmarkSetting.GetSelectedIndustry()); Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsDisplay(input.ExpectedData.Industrys)); //2.Click +行业对标 buttons. IndustryBenchmarkSetting.ClickAddBenchMark(); //· There isn't any 行业=酒店 can be selected from dropdown list. Assert.IsFalse(IndustryBenchmarkSetting.IsDropdownItemExist(input.InputData.Industry)); //Select 行业=通讯. The 区域 display all item unchecked. Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsUnChecked(input.InputData.ClimaticRegions)); //Click other benchmark from list and click 修改 button. Go to 行业 dropdown list to check. IndustryBenchmarkSetting.FocusOnBenchMark(input.InputData.Industry); IndustryBenchmarkSetting.ClickModifyBenchMark(); Assert.IsFalse(IndustryBenchmarkSetting.IsDropdownItemExist(input.InputData.Industry)); }
public void ViewMapAndLocation(IndustryBenchmarkData input) { //Click one Benchmark from Benchmark List. IndustryBenchmarkSetting.FocusOnBenchMark(input.InputData.Industry); //·Display properties 行业 and 区域 of selected benchmark in View mode. //· Only the checked 区域 display in view mode.The checkboxes are disabled in View mode. Assert.AreEqual(input.InputData.Industry, IndustryBenchmarkSetting.GetSelectedIndustry()); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[1])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[6])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[2])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[3])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[4])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[5])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[0])); //Verify benchmark list column filter and sort.Not support filter and sort for any column. }
public void SaveBenchmarkWithoutModify(IndustryBenchmarkData input) { //Industry. Click a benchmark(行业=全行业; 区域=全部地区 ) from list and click 修改 button. IndustryBenchmarkSetting.FocusOnBenchMark(input.InputData.Industry); IndustryBenchmarkSetting.ClickModifyBenchMark(); TimeManager.ShortPause(); //· The benchmark combox is gray and can't not be modified. //· The benchmark combox display the correct industry. //· All the checked and unchecked 区域 display in modify mode. Assert.IsFalse(IndustryBenchmarkSetting.IsIndustryComboxEnabled()); Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsDisplay(input.ExpectedData.ClimaticRegions)); //· checked区域=全部地区 and other regions are unchecked. Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsChecked(input.InputData.ClimaticRegions)); //Click save directly without modification. //· Go to view status and the 行业=全行业 and checked 区域=全部地区 display. IndustryBenchmarkSetting.ClickSaveBenchMark(); TimeManager.ShortPause(); Assert.IsTrue(IndustryBenchmarkSetting.AreClimateRegionsChecked(input.InputData.ClimaticRegions)); }
public void AddIndustryBenchmarkValid(IndustryBenchmarkData input) { //Click +行业对标 buttons. IndustryBenchmarkSetting.ClickAddBenchMark(); //Select 行业=酒店 from dropdown list. IndustryBenchmarkSetting.SelectIndustryCombox(input.InputData.Industry); //Display properties of selected benchmark in add mode. Assert.AreEqual(input.InputData.Industry, IndustryBenchmarkSetting.GetSelectedIndustry()); //Check some 区域=全部地区+严寒地区A区 checkbox. Click Save button. IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[0]); IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[1]); IndustryBenchmarkSetting.ClickSaveBenchMark(); //· Only the checked 区域=全部地区+严寒地区A区 display in view status. The unchecked 区域 not display Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[0])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[1])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[2])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[3])); Assert.IsTrue(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[4])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[0])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[1])); //Click the saved menchmark from list. IndustryBenchmarkSetting.FocusOnBenchMark(input.InputData.Industry); //· Go to view status and the 行业=酒店 and 区域= display successfully the same as before save. Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[0])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[1])); //Click +行业对标 buttons. Go to 行业 dropdown list to check. IndustryBenchmarkSetting.ClickAddBenchMark(); IndustryBenchmarkSetting.DisplayIndustryItems(); //· The saved benchmark 行业 will not display in the dropdown list. Assert.IsFalse(IndustryBenchmarkSetting.IsIndustryInDropdownList(input.InputData.Industry)); //Select 行业=酒店三星级 from dropdown list, Check all 区域=全部地区+严寒地区A区_...... checkbox box. Click Save button. IndustryBenchmarkSetting.SelectIndustryCombox(input.ExpectedData.Industry); IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[0]); IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[1]); IndustryBenchmarkSetting.CheckClimateRegion(input.ExpectedData.ClimaticRegions[0]); IndustryBenchmarkSetting.CheckClimateRegion(input.ExpectedData.ClimaticRegions[1]); IndustryBenchmarkSetting.CheckClimateRegion(input.ExpectedData.ClimaticRegions[2]); IndustryBenchmarkSetting.CheckClimateRegion(input.ExpectedData.ClimaticRegions[3]); IndustryBenchmarkSetting.CheckClimateRegion(input.ExpectedData.ClimaticRegions[4]); IndustryBenchmarkSetting.ClickSaveBenchMark(); //· The benchmark with all 区域 save to bmenchmark list successfully. Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[0])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.InputData.ClimaticRegions[1])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[0])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[1])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[2])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[3])); Assert.IsFalse(IndustryBenchmarkSetting.IsClimateRegionNotDisplay(input.ExpectedData.ClimaticRegions[4])); //Add all 行业 from dropdown list. Click +行业对标 buttons. 2Industry Industrys int i = 0; while (i < input.InputData.Industrys.Length) { IndustryBenchmarkSetting.ClickAddBenchMark(); IndustryBenchmarkSetting.DisplayIndustryItems(); IndustryBenchmarkSetting.SelectIndustryCombox(input.InputData.Industrys[i]); TimeManager.ShortPause(); IndustryBenchmarkSetting.CheckClimateRegion(input.InputData.ClimaticRegions[0]); IndustryBenchmarkSetting.ClickSaveBenchMark(); TimeManager.ShortPause(); i++; } IndustryBenchmarkSetting.ClickAddBenchMark(); }