* Code for task#54463. Modify review code.
This commit is contained in:
@@ -220,7 +220,8 @@ $lang->testcase->resultList['blocked'] = 'Blocked';
|
||||
|
||||
$lang->testcase->buttonToList = 'Back';
|
||||
|
||||
$lang->testcase->stepsEmpty = 'Case step %s cannot be empty.';
|
||||
$lang->testcase->whichLine = 'Line No.%s : ';
|
||||
$lang->testcase->stepsEmpty = 'Step %s cannot be empty.';
|
||||
$lang->testcase->errorEncode = 'No data. Please select right encoding and upload again!';
|
||||
$lang->testcase->noFunction = 'Iconv and mb_convert_encoding are not found. You cannot convert the data to the encoding you want!';
|
||||
$lang->testcase->noRequire = "Row %s has“%s ”which is a required field and it should not be blank.";
|
||||
|
||||
@@ -220,7 +220,8 @@ $lang->testcase->resultList['blocked'] = '阻塞';
|
||||
|
||||
$lang->testcase->buttonToList = '返回';
|
||||
|
||||
$lang->testcase->stepsEmpty = '用例步骤%s不能为空';
|
||||
$lang->testcase->whichLine = '第%s行';
|
||||
$lang->testcase->stepsEmpty = '步骤%s不能为空';
|
||||
$lang->testcase->errorEncode = '无数据,请选择正确的编码重新上传!';
|
||||
$lang->testcase->noFunction = '不存在iconv和mb_convert_encoding转码方法,不能将数据转成想要的编码!';
|
||||
$lang->testcase->noRequire = "%s行的“%s”是必填字段,不能为空";
|
||||
|
||||
@@ -1225,6 +1225,19 @@ class testcaseModel extends model
|
||||
$branch = (int)$branch;
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
$steps = $data->desc;
|
||||
foreach($data->expect as $key => $expects)
|
||||
{
|
||||
foreach($expects as $exportID => $value)
|
||||
{
|
||||
if(!empty($value) and (!isset($steps[$key][$exportID]) or empty($steps[$key][$exportID])))
|
||||
{
|
||||
dao::$errors = sprintf($this->lang->testcase->whichLine, $key) . sprintf($this->lang->testcase->stepsEmpty, $exportID);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_POST['id']))
|
||||
{
|
||||
$oldSteps = $this->dao->select('t2.*')->from(TABLE_CASE)->alias('t1')
|
||||
|
||||
Reference in New Issue
Block a user