def test_set_transition_speed_str(self): """ Test the transition_speed setter with a str """ # GIVEN: A AlignmentTransitionsPage instance page = AlignmentTransitionsPage() # WHEN: The property is set page.transition_speed = TransitionSpeed.to_string(TransitionSpeed.Slow) # THEN: The combobox should be correct assert page.transition_speed_combo_box.currentIndex() == 2
def test_set_transition_speed_exception(self): """ Test the transition_speed setter with something other than a str or int """ # GIVEN: A AlignmentTransitionsPage instance page = AlignmentTransitionsPage() # WHEN: The property is set # THEN: An exception is raised with pytest.raises( TypeError, match='transition_speed must either be a string or an int'): page.transition_speed = []