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")
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")
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" )
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")