feat: update backend OCR parser, web app, mobile app camera/preview UI, tests, and documentation with sample images
This commit is contained in:
1 parent
aa3233e411
commit
bdb3a49742
71 files changed
+3360
-764
No files matched your search
@@ -0,0 +1,33 @@
|
||||
const BASE_URL = 'http://localhost:3000/api/test-correction';
|
||||
|
||||
async function runCorrectionTests() {
|
||||
console.log('=== RUNNING OCR INTELLIGENT CORRECTION & Auto-FILL TESTS ===');
|
||||
|
||||
try {
|
||||
const res = await fetch(BASE_URL);
|
||||
if (!res.ok) {
|
||||
console.error(`Failed to hit test endpoint, status: ${res.status}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const data = await res.json();
|
||||
console.log(`Test suite status: ${data.status.toUpperCase()}`);
|
||||
|
||||
for (const result of data.results) {
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
if (data.status === 'success') {
|
||||
console.log('\nALL OCR CORRECTION TESTS PASSED SUCCESSFULLY! ✅');
|
||||
process.exit(0);
|
||||
} else {
|
||||
console.error('\nSOME TEST CASES FAILED! ❌');
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Test run error:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
runCorrectionTests();
|
||||
Reference in new issue
Block a user