Exemplo n.º 1
0
 def test_cannot_add_comment(self, control, soft_assert, selenium):
     """Check that user can't add a comment: input field is not displayed and
 "Add Comment" button opens a new browser tab."""
     webui_facade.soft_assert_cannot_add_comment(soft_assert, control)
     soft_assert.expect(webui_facade.are_tabs_urls_equal(),
                        "Tabs urls should be equal.")
     soft_assert.assert_expectations()
Exemplo n.º 2
0
 def test_user_cannot_add_person_to_custom_role(self, obj, role, selenium,
                                                soft_assert):
   """Tests that user cannot add a person to custom Role."""
   webui_facade.soft_assert_role_cannot_be_edited(soft_assert, obj, role)
   soft_assert.expect(webui_facade.are_tabs_urls_equal(),
                      "Urls should be equal.")
   soft_assert.assert_expectations()
Exemplo n.º 3
0
 def test_user_cannot_update_custom_attribute(self, obj, selenium,
                                              soft_assert):
   """Tests that user cannot update custom attribute."""
   cad = rest_facade.create_gcad(
       definition_type=obj.type.lower(),
       attribute_type=element.AdminWidgetCustomAttributes.RICH_TEXT)
   soft_assert.expect(
       not factory.get_cls_webui_service(objects.get_plural(
           obj.type))().has_gca_inline_edit(obj, ca_title=cad.title),
       "GCA field should not be editable.")
   soft_assert.expect(webui_facade.are_tabs_urls_equal(),
                      "Tabs urls should be equal.")
   soft_assert.assert_expectations()
Exemplo n.º 4
0
 def test_user_cannot_map_control_to_scope_ojbects_via_add_tab(
         self, control, soft_assert, selenium):
   """Tests that user cannot map control to scope objects/directives
   via 'Add Tab' menu."""
   service = webui_service.ControlsService(selenium)
   controls_info_widget = service.open_info_page_of_obj(control)
   controls_info_widget.click_add_tab_btn()
   hidden_items = controls_info_widget.get_hidden_items_from_add_tab()
   for h_item in hidden_items:
     controls_info_widget.click_add_tab_btn()
     h_item.click()
     soft_assert.expect(webui_facade.are_tabs_urls_equal(),
                        "Tabs urls should be equal.")
     webui_facade.soft_assert_no_modals_present(
         unified_mapper.BaseUnifiedMapperModal(), soft_assert)
     old_tab, new_tab = browsers.get_browser().windows()
     old_tab.use()
     new_tab.close()
   soft_assert.assert_expectations()