Files
prop-ai-hr/scripts/tests/processing-import-ui.test.sh
T

19 lines
592 B
Bash

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
PAGE="$ROOT_DIR/frontend/src/views/knowledge/processing.vue"
grep -Fq '>批量导入</el-button>' "$PAGE"
grep -Fq ':data="pagedTasks"' "$PAGE"
grep -Fq 'v-model:current-page="taskPage"' "$PAGE"
grep -Fq 'const pagedTasks = computed' "$PAGE"
for removed in '选择目录' '服务端导入' 'webkitdirectory'; do
if grep -Fq "$removed" "$PAGE"; then
echo "FAIL: processing page still contains $removed" >&2
exit 1
fi
done
echo 'PASS: processing page exposes batch import only'