* Finish task#54463.
This commit is contained in:
@@ -220,6 +220,7 @@ $lang->testcase->resultList['blocked'] = 'Blocked';
|
||||
|
||||
$lang->testcase->buttonToList = 'Back';
|
||||
|
||||
$lang->testcase->stepsEmpty = 'Case %s step 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,6 +220,7 @@ $lang->testcase->resultList['blocked'] = '阻塞';
|
||||
|
||||
$lang->testcase->buttonToList = '返回';
|
||||
|
||||
$lang->testcase->stepsEmpty = '用例%s步骤不能为空';
|
||||
$lang->testcase->errorEncode = '无数据,请选择正确的编码重新上传!';
|
||||
$lang->testcase->noFunction = '不存在iconv和mb_convert_encoding转码方法,不能将数据转成想要的编码!';
|
||||
$lang->testcase->noRequire = "%s行的“%s”是必填字段,不能为空";
|
||||
|
||||
@@ -39,6 +39,17 @@ class testcaseModel extends model
|
||||
*/
|
||||
function create($bugID)
|
||||
{
|
||||
$steps = $this->post->steps;
|
||||
$expects = $this->post->expects;
|
||||
foreach($expects as $key => $value)
|
||||
{
|
||||
if(empty($steps[$key]))
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->testcase->stepsEmpty, $key);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$now = helper::now();
|
||||
$status = $this->getStatus('create');
|
||||
$case = fixer::input('post')
|
||||
@@ -705,6 +716,17 @@ class testcaseModel extends model
|
||||
*/
|
||||
public function update($caseID, $testtasks = array())
|
||||
{
|
||||
$steps = $this->post->steps;
|
||||
$expects = $this->post->expects;
|
||||
foreach($expects as $key => $value)
|
||||
{
|
||||
if(empty($steps[$key]))
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->testcase->stepsEmpty, $key);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$now = helper::now();
|
||||
$oldCase = $this->getById($caseID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user