* [misc] Enhance unit tests for executionTao::setKanbanMenu() method
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2884,6 +2884,19 @@ class executionTest
|
||||
return $this->executionModel->lang->execution->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试设置看板菜单后获取完整的lang对象。
|
||||
* Test get full lang object after setting kanban menu.
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function setKanbanMenuWithLangTest(): object
|
||||
{
|
||||
$this->executionModel->setKanbanMenu();
|
||||
return $this->executionModel->lang->execution;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件设置执行二级导航。
|
||||
* Set secondary navigation based on the conditions.
|
||||
|
||||
Regular → Executable
+35
-10
@@ -7,20 +7,45 @@ su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->setKanbanMenu();
|
||||
title=测试 executionTao::setKanbanMenu();
|
||||
timeout=0
|
||||
cid=1
|
||||
cid=0
|
||||
|
||||
- 测试替换看板执行的二级菜单第kanban条的link属性 @看板|execution|kanban|executionID=%s
|
||||
- 查看构建菜单第build条的link属性 @构建|execution|build|executionID=%s
|
||||
- 查看累积流图菜单第CFD条的link属性 @累积流图|execution|cfd|executionID=%s
|
||||
- 查看设置菜单第settings条的link属性 @设置|execution|view|executionID=%s
|
||||
- 执行$menu第kanban条的link属性 @看板|execution|kanban|executionID=%s
|
||||
- 执行$menu第CFD条的link属性 @累积流图|execution|cfd|executionID=%s
|
||||
- 执行$menu第build条的link属性 @构建|execution|build|executionID=%s
|
||||
- 执行$menu第settings条的link属性 @设置|execution|view|executionID=%s
|
||||
- 执行$menu第kanban条的subModule属性 @task
|
||||
- 执行$menu第build条的alias属性 @bug
|
||||
- 执行$menu第settings条的class属性 @dropdown dropdown-hover
|
||||
- 执行$menu2第kanban条的link属性 @看板|execution|kanban|executionID=%s
|
||||
|
||||
*/
|
||||
|
||||
$executionTester = new executionTest();
|
||||
|
||||
// 测试步骤1:验证看板菜单的link属性
|
||||
$menu = $executionTester->setKanbanMenuTest();
|
||||
r($menu) && p('kanban:link') && e('看板|execution|kanban|executionID=%s'); // 测试替换看板执行的二级菜单
|
||||
r($menu) && p('build:link') && e('构建|execution|build|executionID=%s'); // 查看构建菜单
|
||||
r($menu) && p('CFD:link') && e('累积流图|execution|cfd|executionID=%s'); // 查看累积流图菜单
|
||||
r($menu) && p('settings:link') && e('设置|execution|view|executionID=%s'); // 查看设置菜单
|
||||
r($menu) && p('kanban:link') && e('看板|execution|kanban|executionID=%s');
|
||||
|
||||
// 测试步骤2:验证CFD累积流图菜单的link属性
|
||||
r($menu) && p('CFD:link') && e('累积流图|execution|cfd|executionID=%s');
|
||||
|
||||
// 测试步骤3:验证构建菜单的link属性
|
||||
r($menu) && p('build:link') && e('构建|execution|build|executionID=%s');
|
||||
|
||||
// 测试步骤4:验证设置菜单的基本link属性
|
||||
r($menu) && p('settings:link') && e('设置|execution|view|executionID=%s');
|
||||
|
||||
// 测试步骤5:验证看板菜单的subModule属性
|
||||
r($menu) && p('kanban:subModule') && e('task');
|
||||
|
||||
// 测试步骤6:验证构建菜单的alias属性
|
||||
r($menu) && p('build:alias') && e('bug');
|
||||
|
||||
// 测试步骤7:验证设置菜单的class属性
|
||||
r($menu) && p('settings:class') && e('dropdown dropdown-hover');
|
||||
|
||||
// 测试步骤8:测试多次调用方法的幂等性
|
||||
$menu2 = $executionTester->setKanbanMenuTest();
|
||||
r($menu2) && p('kanban:link') && e('看板|execution|kanban|executionID=%s');
|
||||
Reference in New Issue
Block a user