Files
EasySoft-ZenTaoPMS/module/bug/test/zen/seteditmenu.php
T
2025-09-15 15:09:49 +08:00

39 lines
1.4 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env php
<?php
/**
title=测试 bugZen::setEditMenu();
timeout=0
cid=0
- 步骤1project tab情况 @1
- 步骤2execution tab情况 @1
- 步骤3qa tab情况 @1
- 步骤4devops tab情况 @1
- 步骤5:无效tab情况 @1
*/
// 1. 导入依赖(路径固定,不可修改)
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/bug.unittest.class.php';
// 2. zendata数据准备(根据需要配置)
zendata('bug')->loadYaml('bug_seteditmenu', false, 2)->gen(10);
zendata('product')->loadYaml('product_seteditmenu', false, 2)->gen(3);
zendata('project')->loadYaml('project_seteditmenu', false, 2)->gen(15);
zendata('repo')->loadYaml('repo_seteditmenu', false, 2)->gen(3);
// 3. 用户登录(选择合适角色)
su('admin');
// 4. 创建测试实例(变量名与模块名一致)
$bugTest = new bugTest();
// 5. 🔴 强制要求:必须包含至少5个测试步骤
r($bugTest->setEditMenuTest(1, 'project')) && p() && e('1'); // 步骤1project tab情况
r($bugTest->setEditMenuTest(2, 'execution')) && p() && e('1'); // 步骤2execution tab情况
r($bugTest->setEditMenuTest(3, 'qa')) && p() && e('1'); // 步骤3qa tab情况
r($bugTest->setEditMenuTest(1, 'devops')) && p() && e('1'); // 步骤4devops tab情况
r($bugTest->setEditMenuTest(2, 'invalid')) && p() && e('1'); // 步骤5:无效tab情况