diff --git a/scripts/run-tests.js b/scripts/run-tests.js index 910ed90c..bb2065bb 100644 --- a/scripts/run-tests.js +++ b/scripts/run-tests.js @@ -32,6 +32,7 @@ function formatStatus(status) { const TESTS = { 'chat-document-search': 'test-chat-document-search.js', 'chat-documents-service-search': 'test-chat-documents-service-search.js', + 'custom-field-longtext-ui': 'test-custom-field-longtext-ui.js', 'document-type-restriction': 'test-document-type-restriction.js', 'effective-document-count-cache': 'test-effective-document-count-cache.js', 'failed-reset-all': 'test-failed-reset-all.js', @@ -65,6 +66,7 @@ const AREAS = { ocr: ['ocr-fallback-ai-errors', 'ocr-startup-recovery'], observability: ['log-level-config', 'log-level-logger'], processing: [ + 'custom-field-longtext-ui', 'document-type-restriction', 'ignore-tags-filter', 'effective-document-count-cache', diff --git a/tests/test-custom-field-longtext-ui.js b/tests/test-custom-field-longtext-ui.js new file mode 100644 index 00000000..b7a012f4 --- /dev/null +++ b/tests/test-custom-field-longtext-ui.js @@ -0,0 +1,23 @@ +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +function main() { + const settingsTemplate = fs.readFileSync( + path.join(__dirname, '..', 'views', 'settings.ejs'), + 'utf8' + ); + + assert( + settingsTemplate.includes(''), + 'Expected the custom field type selector to include Long Text' + ); +} + +try { + main(); + console.log('[PASS] Long Text custom field option is available in settings'); +} catch (error) { + console.error('[FAIL] Long Text custom field UI test failed:', error.message); + process.exitCode = 1; +} diff --git a/views/settings.ejs b/views/settings.ejs index 32381008..af5afd3c 100644 --- a/views/settings.ejs +++ b/views/settings.ejs @@ -600,6 +600,7 @@