* Adjust case expect.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
|
||||
use function zin\success;
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/ui.php';
|
||||
class createProductTester extends tester
|
||||
{
|
||||
@@ -37,8 +34,8 @@ class createProductTester extends tester
|
||||
$form->wait(1);
|
||||
if($this->response('method') != 'browse')
|
||||
{
|
||||
if($this->checkFormTips('product')) return $this->success('表单提示信息正确');
|
||||
return $this->failed('表单提示信息不正确');
|
||||
if($this->checkFormTips('product')) return $this->success('创建产品表单页提示信息正确');
|
||||
return $this->failed('创建产品表单页提示信息不正确');
|
||||
}
|
||||
|
||||
/* 跳转到产品需求页面,点击设置菜单查看产品设置页面。 */
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
title=用户登录
|
||||
timeout=0
|
||||
cid=10001
|
||||
|
||||
『产品名称』不能为空。
|
||||
SUCCESS
|
||||
『产品名称』已经有『正常产品1710742180』这条记录了。
|
||||
product
|
||||
browse
|
||||
SUCCESS
|
||||
/**
|
||||
|
||||
title=创建产品测试
|
||||
timeout=0
|
||||
cid=70
|
||||
|
||||
- 缺少产品名称,创建失败
|
||||
- 测试结果 @创建产品表单页提示信息正确
|
||||
- 最终测试状态 @SUCCESS
|
||||
- 使用默认选项创建产品 最终测试状态 @SUCCESS
|
||||
- 创建重复名称的产品 测试结果 @创建产品表单页提示信息正确
|
||||
- 创建正常产品后的跳转链接检查
|
||||
- 属性module @product
|
||||
- 属性method @browse
|
||||
- 创建正常产品成功 最终测试状态 @SUCCESS
|
||||
|
||||
*/
|
||||
chdir(__DIR__);
|
||||
include '../lib/createproduct.ui.class.php';
|
||||
@@ -25,10 +31,10 @@ $products['default'] = '默认产品';
|
||||
$products['normal'] = '正常产品';
|
||||
$products['branch'] = '多分支产品产品';
|
||||
|
||||
r($tester->createDefault($products['null'])) && p('message') && e('表单提示信息正确'); // 缺少产品名称,创建失败
|
||||
r($tester->createDefault($products['default'])) && p('status') && e('SUCCESS'); // 使用默认选项创建产品
|
||||
r($tester->createDefault($products['default'])) && p('message') && e('表单提示信息正确'); // 创建重复名称的产品
|
||||
r($tester->checkLocating($products['normal'])) && p('module,method') && e('product,browse'); // 创建正常产品后的跳转链接检查
|
||||
r($tester->createMultiBranch($products['branch'])) && p('status') && e('SUCCESS'); // 创建正常产品成功
|
||||
r($tester->createDefault($products['null'])) && p('message,status') && e('创建产品表单页提示信息正确,SUCCESS'); // 缺少产品名称,创建失败
|
||||
r($tester->createDefault($products['default'])) && p('status') && e('SUCCESS'); // 使用默认选项创建产品
|
||||
r($tester->createDefault($products['default'])) && p('message') && e('创建产品表单页提示信息正确'); // 创建重复名称的产品
|
||||
r($tester->checkLocating($products['normal'])) && p('module,method') && e('product,browse'); // 创建正常产品后的跳转链接检查
|
||||
r($tester->createMultiBranch($products['branch'])) && p('status') && e('SUCCESS'); // 创建正常产品成功
|
||||
|
||||
$tester->closeBrowser();
|
||||
|
||||
Reference in New Issue
Block a user