@@ -8,6 +8,7 @@ const pagePath = path.join(repoRoot, 'src/folderview.plus/usr/local/emhttp/plugi
88const importScriptPath = path . join ( repoRoot , 'src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/scripts/folderviewplus.import.js' ) ;
99const backupPath = path . join ( repoRoot , 'src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/server/backup.php' ) ;
1010const libPath = path . join ( repoRoot , 'src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/server/lib.php' ) ;
11+ const libPrefsPath = path . join ( repoRoot , 'src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/server/lib.prefs.php' ) ;
1112const settingsCssPath = path . join ( repoRoot , 'src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/styles/folderviewplus.css' ) ;
1213
1314const page = fs . readFileSync ( pagePath , 'utf8' ) ;
@@ -37,6 +38,7 @@ const importScript = fs.readFileSync(importScriptPath, 'utf8');
3738const runtimeScript = `${ script } \n${ importScript } ` ;
3839const backupPhp = fs . readFileSync ( backupPath , 'utf8' ) ;
3940const libPhp = fs . readFileSync ( libPath , 'utf8' ) ;
41+ const libPrefsPhp = fs . readFileSync ( libPrefsPath , 'utf8' ) ;
4042const settingsCss = fs . readFileSync ( settingsCssPath , 'utf8' ) ;
4143
4244test ( 'settings page onclick handlers are exported on window' , ( ) => {
@@ -148,6 +150,7 @@ test('settings page exposes theme fallback controls and runtime self-heal action
148150 assert . match ( script , / e l s e i f \( k e y = = = ' p a g e V i e w M o d e ' \) \{ / ) ;
149151 assert . match ( script , / c a t c h \( e r r o r \) \{ \s * r e n d e r V i s i b i l i t y C o n t r o l s \( t y p e \) ; [ \s \S ] * s h o w E r r o r \( ' V i s i b i l i t y p r e f e r e n c e s a v e f a i l e d ' , e r r o r \) ; / ) ;
150152 assert . match ( script , / e l s e i f \( k e y = = = ' t h e m e C o m p a t i b i l i t y M o d e ' \) \{ / ) ;
153+ assert . match ( libPrefsPhp , / f u n c t i o n n o r m a l i z e R u n t i m e P a g e V i e w M o d e \( \$ v a l u e \) : s t r i n g \{ [ \s \S ] * \[ ' f o l d e r v i e w ' , ' h o s t ' , ' c o m m a n d ' , ' s e r v i c e - m a p ' , ' t r e e - e x p l o r e r ' \] / ) ;
151154} ) ;
152155
153156test ( 'backup endpoint supports scheduler and rollback actions' , ( ) => {
0 commit comments