改造流水明细详情弹窗并统一列表样式
This commit is contained in:
27
ruoyi-ui/tests/unit/project-table-style.test.js
Normal file
27
ruoyi-ui/tests/unit/project-table-style.test.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const componentPath = path.resolve(
|
||||
__dirname,
|
||||
"../../src/views/ccdiProject/components/ProjectTable.vue"
|
||||
);
|
||||
const source = fs.readFileSync(componentPath, "utf8");
|
||||
|
||||
const tableBlockMatch = source.match(/<el-table[\s\S]*?style="width: 100%"[\s\S]*?>/m);
|
||||
|
||||
assert(tableBlockMatch, "未找到项目列表表格");
|
||||
assert(
|
||||
!/\sborder(\s|>)/.test(tableBlockMatch[0]),
|
||||
"项目列表表格不应启用边框"
|
||||
);
|
||||
assert(
|
||||
!/\sstripe(\s|>)/.test(tableBlockMatch[0]),
|
||||
"项目列表表格不应启用斑马纹"
|
||||
);
|
||||
assert(
|
||||
!source.includes("::v-deep .el-table"),
|
||||
"项目列表不应继续保留自定义深度表格皮肤"
|
||||
);
|
||||
|
||||
console.log("project-table-style test passed");
|
||||
Reference in New Issue
Block a user