def test_radiobuttons_labelled_by_free_text(self): self.assertTrue(RadioButton("male").exists()) self.assertTrue(RadioButton("female").exists()) self.assertTrue(RadioButton("male").is_selected()) self.assertFalse(RadioButton("female").is_selected())
def test_radio_button_not_exists(self): self.assertIs(False, RadioButton("Nonexistent option").exists())
def test_text_field_is_not_a_radio_button(self): self.assertIs(False, RadioButton("Empty Text Field").exists())
def test_second_radio_button_is_not_selected(self): self.assertIs(False, RadioButton("RadioButton 2").is_selected())
def test_select_second_radio_button(self): click(RadioButton("RadioButton 2")) self.assertIs(False, RadioButton("RadioButton 1").is_selected()) self.assertIs(True, RadioButton("RadioButton 2").is_selected())
def test_first_radio_button_is_selected(self): self.assertIs(True, RadioButton("RadioButton 1").is_selected())
def test_left_labelled_radio_button_two_exists(self): self.assertIs(True, RadioButton("Left Labeled RadioButton 2").exists())
def test_second_radio_button_exists(self): self.assertIs(True, RadioButton("RadioButton 2").exists())
def test_first_radio_button_exists_lower_case(self): self.assertIs(True, RadioButton("radiobutton 1").exists())
def test_first_radio_button_exists(self): self.assertIs(True, RadioButton("RadioButton 1").exists())