* Adjust code function confirmAction for testtask betchRun.
This commit is contained in:
@@ -114,7 +114,7 @@ js::set('cancelURL', $this->createLink('testtask', 'batchRun', "productID=$
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr data-id='<?php echo $case->id?>'>
|
||||
<tr data-id='<?php echo $case->id?>' data-auto='<?php echo $case->auto;?>'>
|
||||
<?php foreach($setting as $key => $value) $this->testcase->printCell($value, $case, $users, $branchOption, $modulePairs, $browseType, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php $caseProductIds[$case->product] = $case->product;?>
|
||||
@@ -308,6 +308,18 @@ function runAutocase()
|
||||
|
||||
function confirmAction(obj)
|
||||
{
|
||||
var autoRun = 'no';
|
||||
$.each($('input[name^=caseIDList]:checked'),function(){
|
||||
var dataAuto = $(this).parents('tr').attr('data-auto');
|
||||
if(dataAuto == 'auto') autoRun = dataAuto;
|
||||
});
|
||||
|
||||
if(autoRun == 'no')
|
||||
{
|
||||
setFormAction(cancelURL, '', '#caseList');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(confirm(runCaseConfirm))
|
||||
{
|
||||
var result = runAutocase();
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<?php if($cases):?>
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr>
|
||||
<tr data-auto='<?php echo $case->auto;?>'>
|
||||
<td class='c-id'>
|
||||
<?php if($hasCheckbox):?>
|
||||
<?php echo html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id)));?>
|
||||
@@ -188,6 +188,18 @@ function runAutocase()
|
||||
|
||||
function confirmAction(obj)
|
||||
{
|
||||
var autoRun = 'no';
|
||||
$.each($('input[name^=caseIDList]:checked'),function(){
|
||||
var dataAuto = $(this).parents('tr').attr('data-auto');
|
||||
if(dataAuto == 'auto') autoRun = dataAuto;
|
||||
});
|
||||
|
||||
if(autoRun == 'no')
|
||||
{
|
||||
setFormAction(cancelURL, '', '#caseList');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(confirm(runCaseConfirm))
|
||||
{
|
||||
var result = runAutocase();
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($cases as $caseID => $case):?>
|
||||
<?php if($case->auto == 'auto' and $confirm == 'yes') continue;?>
|
||||
<?php if($case->status == 'wait') continue;?>
|
||||
<?php if(!$productID) echo html::hidden("caseIDList[$case->id]", $caseID); ?>
|
||||
<tr class='text-center'>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($runs as $run):?>
|
||||
<tr data-id='<?php echo $run->id?>'>
|
||||
<tr data-id='<?php echo $run->id?>' data-auto='<?php echo $run->auto;?>'>
|
||||
<?php foreach($setting as $key => $value) $this->testtask->printCell($value, $run, $users, $task, $branches, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
@@ -189,6 +189,18 @@ function runAutocase()
|
||||
|
||||
function confirmAction(obj)
|
||||
{
|
||||
var autoRun = 'no';
|
||||
$.each($('input[name^=caseIDList]:checked'),function(){
|
||||
var dataAuto = $(this).parents('tr').attr('data-auto');
|
||||
if(dataAuto == 'auto') autoRun = dataAuto;
|
||||
});
|
||||
|
||||
if(autoRun == 'no')
|
||||
{
|
||||
setFormAction(cancelURL, '', '#caseList');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(confirm(runCaseConfirm))
|
||||
{
|
||||
var result = runAutocase();
|
||||
|
||||
@@ -404,6 +404,7 @@ class zanode extends control
|
||||
|
||||
foreach($cases as $id => $case)
|
||||
{
|
||||
if($case->auto != 'auto') continue;
|
||||
$resultID = $this->loadModel('testtask')->initResult(0, $id, $case->version, $script->node);
|
||||
if(!dao::isError()) $this->zanode->runZTFScript($script->id, $id, $resultID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user