public function testBug1637() { $this->module->amOnPage('/form/bug1637'); // confirm that options outside a form are still selectable $this->module->selectOption('input[name=first_test_radio]', 'Yes'); // confirm that it did what we expected and did not do anything else $this->module->seeOptionIsSelected('input[name=first_test_radio]', 'Yes'); $this->module->dontSeeOptionIsSelected('input[name=first_test_radio]', 'No'); }
public function testRadioButtonByLabelOnContext() { $this->module->amOnPage('/form/radio'); $this->module->selectOption('form input', 'Get Off'); $this->module->seeOptionIsSelected('form input', 'disagree'); $this->module->dontSeeOptionIsSelected('form input', 'agree'); $this->module->click('Submit'); $form = data::get('form'); $this->assertEquals('disagree', $form['terms']); }
public function testBug1467() { $this->module->amOnPage('/form/bug1467'); $this->module->selectOption('form[name=form2] input[name=first_test_radio]', 'Yes'); $this->module->selectOption('form[name=form2] input[name=second_test_radio]', 'No'); $this->module->seeOptionIsSelected('form[name=form2] input[name=first_test_radio]', 'Yes'); $this->module->seeOptionIsSelected('form[name=form2] input[name=second_test_radio]', 'No'); // shouldn't have touched form1 at all $this->module->dontSeeOptionIsSelected('form[name=form1] input[name=first_test_radio]', 'No'); $this->module->dontSeeOptionIsSelected('form[name=form1] input[name=first_test_radio]', 'Yes'); $this->module->dontSeeOptionIsSelected('form[name=form1] input[name=second_test_radio]', 'No'); $this->module->dontSeeOptionIsSelected('form[name=form1] input[name=second_test_radio]', 'Yes'); }