* Fix check autocase for batch run case.
This commit is contained in:
@@ -23,6 +23,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
js::set('productID', $productID);
|
||||
js::set('branch', $branch);
|
||||
js::set('suiteID', $suiteID);
|
||||
js::set('automation', !empty($automation) ? $automation->id : 0);
|
||||
js::set('runCaseConfirm', $lang->zanode->runCaseConfirm);
|
||||
js::set('confirmURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy&from=testcase&taskID=0&confirm=yes"));
|
||||
js::set('cancelURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy&from=testcase&taskID=0&confirm=no"));
|
||||
@@ -292,7 +293,7 @@ function runAutocase()
|
||||
caseIDList.push($(this).val());
|
||||
});
|
||||
|
||||
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=<?php echo $automation->id;?>')
|
||||
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation)
|
||||
|
||||
var postData = {'caseIDList' : caseIDList.join(',')};
|
||||
$.post(url, postData, function(result)
|
||||
@@ -314,7 +315,7 @@ function confirmAction(obj)
|
||||
if(dataAuto == 'auto') autoRun = dataAuto;
|
||||
});
|
||||
|
||||
if(autoRun == 'no')
|
||||
if(autoRun == 'no' || !automation)
|
||||
{
|
||||
setFormAction(cancelURL, '', '#caseList');
|
||||
return false;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<?php $this->app->loadLang('zanode');?>
|
||||
<?php js::set('confirmUnlink', $lang->testsuite->confirmUnlinkCase)?>
|
||||
<?php js::set('flow', $config->global->flow);?>
|
||||
<?php js::set('automation', !empty($automation) ? $automation->id : 0);?>
|
||||
<?php js::set('runCaseConfirm', $lang->zanode->runCaseConfirm);?>
|
||||
<?php js::set('confirmURL', $this->createLink('testtask', 'batchRun', "productID=$suite->product&orderBy=id_desc&from=testcase&taskID=0&confirm=yes"));?>
|
||||
<?php js::set('cancelURL', $this->createLink('testtask', 'batchRun', "productID=$suite->product&orderBy=id_desc&from=testcase&taskID=0&confirm=no"));?>
|
||||
@@ -172,7 +173,7 @@ function runAutocase()
|
||||
caseIDList.push($(this).val());
|
||||
});
|
||||
|
||||
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=<?php echo $automation->id;?>')
|
||||
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation)
|
||||
|
||||
var postData = {'caseIDList' : caseIDList.join(',')};
|
||||
$.post(url, postData, function(result)
|
||||
@@ -194,7 +195,7 @@ function confirmAction(obj)
|
||||
if(dataAuto == 'auto') autoRun = dataAuto;
|
||||
});
|
||||
|
||||
if(autoRun == 'no')
|
||||
if(autoRun == 'no' || !automation)
|
||||
{
|
||||
setFormAction(cancelURL, '', '#caseList');
|
||||
return false;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<?php js::set('taskCaseBrowseType', ($browseType == 'bymodule' and $this->session->taskCaseBrowseType == 'bysearch') ? 'all' : $this->session->taskCaseBrowseType);?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('moduleID', $moduleID);?>
|
||||
<?php js::set('automation', !empty($automation) ? $automation->id : 0);?>
|
||||
<?php $this->app->loadLang('zanode');?>
|
||||
<?php js::set('runCaseConfirm', $lang->zanode->runCaseConfirm);?>
|
||||
<?php js::set('confirmURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=id_desc&from=testcase&taskID=$taskID&confirm=yes"));?>
|
||||
@@ -173,7 +174,7 @@ function runAutocase()
|
||||
caseIDList.push($(this).val());
|
||||
});
|
||||
|
||||
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=<?php echo $automation->id;?>');
|
||||
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation)
|
||||
|
||||
var postData = {'caseIDList' : caseIDList.join(',')};
|
||||
$.post(url, postData, function(result)
|
||||
@@ -195,7 +196,7 @@ function confirmAction(obj)
|
||||
if(dataAuto == 'auto') autoRun = dataAuto;
|
||||
});
|
||||
|
||||
if(autoRun == 'no')
|
||||
if(autoRun == 'no' || !automation)
|
||||
{
|
||||
setFormAction(cancelURL, '', '#caseList');
|
||||
return false;
|
||||
|
||||
@@ -66,7 +66,7 @@ $lang->zanode->createImageButton = '去创建';
|
||||
|
||||
$lang->zanode->imageNameEmpty = '名称不能为空';
|
||||
|
||||
$lang->zanode->runTimeout = '网络连接超时,请检查宿主机和执行节点状态';
|
||||
$lang->zanode->runTimeout = '自动执行失败,请检查宿主机和执行节点状态';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = '执行节点不存在';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user