Ejemplo n.º 1
0
        public void ModifyWithSelectNoOption(CustomerManagementData input)
        {
            //Select an existing customer.
            CustomerManageSetting.FocusOnCustomer(input.InputData.CommonName);

            //Open 'Consumption Setting For Map' (地图页信息) tab.
            CustomerManageSetting.NavigateToCustmerMapPageInfoSetting();
            TimeManager.MediumPause();

            //Click 'Modify' button.
            CustomerManageSetting.ClickModifyMapPropertyButton();
            TimeManager.MediumPause();

            //Uncheck all selected options.
            Assert.IsTrue(CustomerManageSetting.UnCheckMapInformations(input.InputData.MapOptions));
            CustomerManageSetting.UnCheckMapInformations(input.ExpectedData.MapOptions);
            // Click Save button.
            CustomerManageSetting.ClickSaveMapPropertyButton();
            TimeManager.MediumPause();

            // Error message 'Please select one option at least' is displayed.
            //Assert.IsTrue(CustomerManageSetting.IsInvalidMessageCorrect("请至少选择一项。"));
            //  The error message disappeared.
            Assert.IsTrue(CustomerManageSetting.IsMapInfoCheckBoxInvalidTipsDisplayed());

            //Check one option.
            CustomerManageSetting.CheckMapInformation(input.InputData.MapOptions[0]);
            Assert.IsFalse(CustomerManageSetting.IsMapInfoCheckBoxInvalidTipsDisplayed());
            // Saved successfully and no 'Save' button on the page after saved.
            CustomerManageSetting.ClickSaveMapPropertyButton();
            TimeManager.MediumPause();
            Assert.IsFalse(CustomerManageSetting.IsMapSaveButtonDisplayed());
        }