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")
Esempio n. 2
0
 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()
Esempio n. 3
0
 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()
Esempio n. 4
0
 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()
Esempio n. 5
0
 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()
Esempio n. 6
0
    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
Esempio n. 7
0
  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
Esempio n. 8
0
 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")
Esempio n. 9
0
 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)
Esempio n. 10
0
 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")
Esempio n. 11
0
 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)
Esempio n. 12
0
 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)
Esempio n. 13
0
 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)