Merge remote-tracking branch 'origin/release-20.0'
This commit is contained in:
@@ -4,9 +4,9 @@ $(function()
|
||||
loadResult();
|
||||
});
|
||||
|
||||
$('#runCaseModal').closest('.modal').on('hide.zui.modal', function()
|
||||
$('#runCaseModal').closest('.modal').off('hide.zui.modal').on('hide.zui.modal', function()
|
||||
{
|
||||
if($('#casesResults').length == 0) loadCurrentPage();
|
||||
loadCurrentPage();
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
+3
-12
@@ -657,26 +657,17 @@ class testtaskZen extends testtask
|
||||
$automation = $this->loadModel('zanode')->getAutomationByProduct($run->case->product);
|
||||
if($run->case->auto == 'auto' && $confirm == '')
|
||||
{
|
||||
if(!$automation)
|
||||
{
|
||||
if(helper::isAjaxRequest()) return $this->send(array('load' => $cancelURL));
|
||||
$this->locate($cancelURL);
|
||||
}
|
||||
if(!$automation) return $this->send(array('load' => $cancelURL));
|
||||
|
||||
$confirmURL = inlink('runCase', "runID=$runID&caseID=$caseID&version=$version&confirm=yes");
|
||||
if(helper::isAjaxRequest()) return $this->send(array('result' => 'fail', 'load' => array('confirm' => $this->lang->zanode->runCaseConfirm, 'confirmed' => $confirmURL, 'canceled' => $cancelURL)));
|
||||
return print(js::start() . "zui.Modal.hide($(document).find('.modal')); zui.Modal.confirm('{$this->lang->zanode->runCaseConfirm}').then((res) => {if(res){ openUrl({url: '{$confirmURL}', load: 'modal', size: 'lg'});}else{ openUrl({url: '{$cancelURL}', load: 'modal', size: 'lg'});}});" . js::end());
|
||||
return $this->send(array('result' => 'fail', 'load' => array('confirm' => $this->lang->zanode->runCaseConfirm, 'confirmed' => $confirmURL, 'canceled' => $cancelURL)));
|
||||
}
|
||||
|
||||
/* 用户确认后执行自动化测试的相关操作。*/
|
||||
/* Perform automated testing related operations after user confirmation. */
|
||||
if($confirm == 'yes')
|
||||
{
|
||||
if(!$automation)
|
||||
{
|
||||
if(helper::isAjaxRequest()) return $this->send(array('load' => $cancelURL));
|
||||
$this->locate($cancelURL);
|
||||
}
|
||||
if(!$automation) return $this->send(array('load' => $cancelURL));
|
||||
$resultID = $this->testtask->initResultForAutomatedTest($runID, $caseID, $run->case->version, $automation->node);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError(), 'load' => $this->createLink('zanode', 'browse')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user