@@ -20,18 +20,18 @@ const { test, expect } = require('./fixtures');
2020 */
2121test . describe ( 'WLED Settings Pages' , ( ) => {
2222 const settingsPages = [
23- { path : '/settings' , name : 'Main Settings' } ,
24- { path : '/settings/wifi' , name : 'WiFi Settings' } ,
25- { path : '/settings/leds' , name : 'LED Settings' } ,
26- { path : '/settings/ui' , name : 'UI Settings' } ,
27- { path : '/settings/sync' , name : 'Sync Settings' } ,
28- { path : '/settings/time' , name : 'Time Settings' } ,
29- { path : '/settings/sec' , name : 'Security Settings' } ,
30- { path : '/settings/um' , name : 'Usermod Settings' } ,
31- { path : '/settings/2D' , name : '2D Settings' } ,
23+ { path : '/settings' , name : 'Main Settings' , title : 'WLED Settings' } ,
24+ { path : '/settings/wifi' , name : 'WiFi Settings' , title : 'Wi-Fi Settings' } ,
25+ { path : '/settings/leds' , name : 'LED Settings' , title : 'LED Settings' } ,
26+ { path : '/settings/ui' , name : 'UI Settings' , title : 'UI Settings' } ,
27+ { path : '/settings/sync' , name : 'Sync Settings' , title : 'Sync Settings' } ,
28+ { path : '/settings/time' , name : 'Time Settings' , title : 'Time Settings' } ,
29+ { path : '/settings/sec' , name : 'Security Settings' , title : 'Misc Settings' } ,
30+ { path : '/settings/um' , name : 'Usermod Settings' , title : 'Usermod Settings' } ,
31+ { path : '/settings/2D' , name : '2D Settings' , title : '2D Set-up' } ,
3232 ] ;
3333
34- for ( const { path, name } of settingsPages ) {
34+ for ( const { path, name, title } of settingsPages ) {
3535 test ( `${ name } (${ path } ) should load without JavaScript errors` , async ( { page } ) => {
3636 const pageErrors = [ ] ;
3737
@@ -44,8 +44,8 @@ test.describe('WLED Settings Pages', () => {
4444 await page . waitForLoadState ( 'load' ) ;
4545 await page . waitForTimeout ( 2000 ) ;
4646
47- // Check that the page loaded with WLED title
48- await expect ( page ) . toHaveTitle ( / W L E D / ) ;
47+ // Check that the page loaded with expected title
48+ await expect ( page ) . toHaveTitle ( title ) ;
4949
5050 // Check for JavaScript uncaught exceptions
5151 expect ( pageErrors , `Page errors in ${ name } : ${ pageErrors . join ( ', ' ) } ` ) . toHaveLength ( 0 ) ;
0 commit comments