Пример #1
0
 /**
  * @Issue https://github.com/Codeception/Codeception/issues/2733
  */
 public function testSeeSelectedOptionReturnsFirstOptionIfNotSelected()
 {
     $this->module->amOnPage('/form/complex');
     $this->module->seeOptionIsSelected('#age', 'below 13');
     $this->module->click('Submit');
     $form = data::get('form');
     $this->assertEquals('child', $form['age'], 'first option was not submitted');
 }
Пример #2
0
 public function testSelectOptionTextSelector()
 {
     $this->module->amOnPage('/form/select_selectors');
     $this->module->selectOption('age', ['text' => '20']);
     $this->module->seeOptionIsSelected('age', '20');
     $this->module->selectOption('age', ['text' => '21']);
     $this->module->seeOptionIsSelected('age', '21');
 }
Пример #3
0
 public function testSeeSelectedOptionForRadioButton()
 {
     $this->module->amOnPage('/form/example6');
     $this->module->seeOptionIsSelected('input[name=frequency]', 'hour');
     $this->module->dontSeeOptionIsSelected('input[name=frequency]', 'week');
 }
Пример #4
0
 public function testSeeSelectedOption()
 {
     $this->module->amOnPage('/form/select');
     $this->module->seeOptionIsSelected('#age', '60-100');
     $this->module->dontSeeOptionIsSelected('#age', '100-210');
 }