mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-11-29 18:58:26 +08:00
df0d3ddee3
* chore: reuse page instance * refactor: optimize * chore: revert * chore: ignore workflows * chore: upgrade playwright to 1.44.0 * chore: fix failed tests * refactor: optimize e2eUtils * chore: make tests pass * chore: optimize workflow for e2e * chore: fix fialed tests * chore: optimize workflows * chore: optimize * chore: fix path * chore: fix * chore: test * chore: fix * chore: test * chore: test * chore: add bot for e2e * chore: wait to revert * chore: wait to revert * chore: fix * chore: fix * chore: fix bot * chore: test * chore: ignore pro-plugins on PR author is not member * chore: optimize * chore: test * chore: test * chore: test bot * chore: remove title link * chore: fix * chore: fix error and cache yarn * chore: optimize md * chore: add new workflows
32 lines
813 B
JavaScript
32 lines
813 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const glob = require('glob');
|
|
|
|
// 源路径和目标路径
|
|
const sourcePattern = './storage/playwright/tests-report-blob/blob-*/*';
|
|
const targetDir = './storage/playwright/tests-report-blob/';
|
|
|
|
// 确保目标目录存在
|
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
|
|
// 使用 glob 模块匹配文件
|
|
glob(sourcePattern, (err, files) => {
|
|
if (err) {
|
|
console.error('Error matching files:', err);
|
|
return;
|
|
}
|
|
|
|
// 移动每个文件
|
|
files.forEach((file) => {
|
|
const targetFile = path.join(targetDir, path.basename(file));
|
|
|
|
fs.rename(file, targetFile, (err) => {
|
|
if (err) {
|
|
console.error(`Error moving file ${file}:`, err);
|
|
} else {
|
|
console.log(`Moved file ${file} to ${targetDir}`);
|
|
}
|
|
});
|
|
});
|
|
});
|