initForm('execution', 'story', array('execution' => '3'), 'appIframe-execution'); $form->wait(1); $form->dom->btn($this->lang->execution->linkStory)->click(); $form->wait(1); if($form->dom->alertModal('text') == $this->lang->execution->errorNoLinkedProducts) return $this->success('执行未关联产品时提示正确'); return $this->failed('执行未关联产品时提示不正确'); } /** * 关联需求 * Link story * * @access public * @return object */ public function linkStory() { $form = $this->initForm('execution', 'linkstory', array('execution' => '2'), 'appIframe-execution'); $form->wait(1); $name = $form->dom->firstName->getText(); $form->dom->firstCheckbox->click(); $form->dom->saveBtn->click(); $form->wait(1); $storyView = $this->loadPage('execution', 'story'); $storyView->dom->search(array("{$this->lang->story->name},=,{$name}")); $storyView->wait(1); if($storyView->dom->firstName->getText() == $name) return $this->success('关联需求成功'); return $this->failed('关联需求失败'); } }