Ejemplo n.º 1
0
 def test_component_is_not_found_when_trait_raises_an_exception(self):
     component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id'])
     ##
     component.add_trait(raise_exception, 'always true')
     ##
     assert_that(component.is_found(), equal_to(False),
                 "component should not be found when evaluating traits throws an exception")
Ejemplo n.º 2
0
 def test_component_is_found_when_has_all_traits(self):
     component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id'])
     ##
     component.add_trait(lambda: True, 'always true')
     ##
     assert_that(component.is_found(), equal_to(True),
                 "component should be found when all traits are present")
Ejemplo n.º 3
0
 def test_component_is_not_found_when_trait_raises_an_exception(self):
     component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id'])
     ##
     component.add_trait(raise_exception, 'always true')
     ##
     assert_that(
         component.is_found(), equal_to(False),
         "component should not be found when evaluating traits throws an exception"
     )
Ejemplo n.º 4
0
 def test_component_is_found_when_has_all_traits(self):
     component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id'])
     ##
     component.add_trait(lambda: True, 'always true')
     ##
     assert_that(component.is_found(), equal_to(True), "component should be found when all traits are present")