コード例 #1
0
 def add_and_map_obj_widget(self, obj):
     """Adds widget of selected type and
 click `Create and map new object` link and
 returns modal object for selected object type."""
     widget_bar.Programs().add_widget()
     dashboard.CreateObjectDropdown().click_item_by_text(
         text=objects.get_normal_form(obj))
     obj_modal = unified_mapper.CommonUnifiedMapperModal(
         self.driver, obj).click_create_and_map_obj()
     return obj_modal
コード例 #2
0
 def test_mapping_controls_via_lhn(self, selenium, new_control_ui,
                                   new_program_ui):
     """Tests if widget number increases when mapping via LHN."""
     # check that the widget isn't opened yet since it doesn't have any members
     assert selenium.find_element(
         *locator.WidgetBar.CONTROLS).is_displayed() is False
     # map to obj
     (dashboard.Header(selenium).open_lhn_menu(
     ).select_my_objects().select_controls_or_objectives().select_controls(
     ).hover_over_visible_member(
         new_control_ui.title_entered.text).map_to_object())
     control_widget_count = (
         widget_bar.Programs(selenium).select_controls().member_count)
     assert control_widget_count == 1