def verify_counter_not_loaded(self): """ Checks that in case of empty table, counter is not loaded on the filter pane """ selenium_utils.wait_for_element_text( self._driver, locator.BaseWidgetGeneric.FILTER_PANE_COUNTER, "No records")
def wait_member_deleted(self, count): """Wait until elements' counter on filter panel refreshed with new value. Args: count (str) """ if count != '1': new_count = ' {} '.format(int(count) - 1) selenium_utils.wait_for_element_text( self._driver, locator.BaseWidgetGeneric.FILTER_PANE_COUNTER, new_count) else: self.verify_counter_not_loaded()
def wait_member_deleted(self, count): """Wait until elements' counter on filter panel refreshed with new value. Args: count (str) """ selenium_utils.wait_for_js_to_load(self._driver) if count != '1': new_count = ' {}'.format(int(count) - 1) selenium_utils.wait_for_element_text( self._driver, locator.BaseWidgetGeneric.FILTER_PANE_COUNTER, new_count) else: self.verify_counter_not_loaded()
def wait_member_deleted(self, count): """Wait until elements' counter on filter panel refreshed with new value. Args: count (str) """ selenium_utils.wait_for_js_to_load(self._driver) if count != '1': new_count = ' {}'.format(int(count) - 1) selenium_utils.wait_for_element_text( self._driver, self._locators_filter.PAGINATION_CONTROLLERS, new_count) else: self.verify_counter_not_loaded()
def wait_member_deleted(self, count): """Wait until elements' counter on filter panel refreshed with new value. Args: count (str) """ selenium_utils.wait_for_js_to_load(self._driver) if count != '1': new_count = ' {}'.format(int(count) - 1) selenium_utils.wait_for_element_text( self._driver, self._locators_filter.PAGINATION_CONTROLLERS_CSS, new_count) else: self.verify_counter_not_loaded()
def fill_lcas_attr_values(self): """Fill all local custom attribute with values.""" selenium_utils.wait_for_js_to_load(self._driver) cas_headers_and_values = self.info_widget_elem.find_elements( *locator.WidgetInfoAssessment.LCAS_HEADERS_AND_VALUES) dict_cas_scopes = {} if len(cas_headers_and_values) >= 1: for scope in cas_headers_and_values: ca_type = scope.get_attribute("class") if "custom-attribute-date" in ca_type: ca_elem = base.DateCustomAttribute( scope, locator.WidgetInfoPanel.DATE_CA_FIELDS, locator.WidgetInfoPanel.DATE_CA_INPUT) ca_elem.set_value() dict_cas_scopes.update({scope.text: ca_elem.get_value()}) selenium_utils.wait_for_element_text( self._driver, locator.WidgetInfoPanel.CA_SAVED_STATUS, element.GenericWidget.ALL_CHANGES_SAVED) return dict_cas_scopes
def fill_lcas_attr_values(self): """Fill all local custom attribute with values.""" selenium_utils.wait_for_js_to_load(self._driver) cas_headers_and_values = self.info_widget_elem.find_elements( *locator.WidgetInfoAssessment.LCAS_HEADERS_AND_VALUES) dict_cas_scopes = {} if len(cas_headers_and_values) >= 1: for scope in cas_headers_and_values: ca_type = scope.get_attribute("class") if "custom-attribute-date" in ca_type: ca_elem = base.DateCustomAttribute( scope, locator.WidgetInfoPanel.DATE_CA_FIELDS, locator.WidgetInfoPanel.DATE_CA_INPUT) ca_elem.set_value() dict_cas_scopes.update({scope.text: ca_elem.get_value()}) selenium_utils.wait_for_element_text( self._driver, locator.WidgetInfoPanel.CA_SAVED_STATUS, element.GenericWidget.ALL_CHANGES_SAVED) return dict_cas_scopes
def verify_counter_not_loaded(self): """Check that in case of empty table, counter not loaded on filter panel. """ selenium_utils.wait_for_element_text( self._driver, locator.TreeView.NO_RESULTS_MESSAGE, "No results")
def check_success_ca_created_msg(self, ca_title): """Awaiting for success message with given CA title.""" text = "New Custom Attribute Definition {} added successfully"\ .format(ca_title) selenium_utils.wait_for_element_text( self._driver, self._locator.CA_ADDED_SUCCESS_ALERT, text)
def verify_counter_not_loaded(self): """Check that in case of empty table, counter not loaded on filter panel. """ selenium_utils.wait_for_element_text( self._driver, locator.TreeView.NO_RESULTS_MESSAGE, "No results")
def verify_counter_not_loaded(self): """Check that in case of empty table, counter not loaded on filter panel. """ selenium_utils.wait_for_element_text( self._driver, locator.TreeView.NO_RESULTS_MSG_CSS, element.GenericWidget.NO_FILTER_RESULTS)
def verify_counter_not_loaded(self): """Check that in case of empty table, counter not loaded on filter panel. """ selenium_utils.wait_for_element_text( self._driver, locator.TreeView.NO_RESULTS_MSG_CSS, element.GenericWidget.NO_FILTER_RESULTS)
def check_success_ca_created_msg(self, ca_title): """Await for success message with given custom attribute title.""" text = ("New Custom Attribute Definition {} added successfully" .format(ca_title)) selenium_utils.wait_for_element_text( self._driver, self._locators.CA_ADDED_SUCCESS_ALERT, text)