@@ -21,7 +21,7 @@ import childProcess, { execSync } from 'child_process';
2121
2222const samplesDir = path . join ( __dirname , '..' , 'samples' ) ;
2323
24- // List of samples to exclude from testing.
24+ // List folders to exclude from testing.
2525const excludedFolders = [ "js-api-loader-map" ] ;
2626
2727// Function to return all sample folders.
@@ -81,17 +81,17 @@ const getChangedSampleFolders = (): string[] => {
8181 const folderPath = path . join ( samplesDir , folderName ) ;
8282 return fs . existsSync ( folderPath ) && fs . statSync ( folderPath ) . isDirectory ( ) ;
8383 } ) ;
84-
85- // Filter out the samples we want to skip .
84+
85+ // Filter out excluded folders .
8686 validChangedFolders . filter ( folder => ! excludedFolders . includes ( folder ) ) ;
87-
87+
8888 if ( validChangedFolders . length === 0 ) {
8989 console . warn ( "Folders were found, but none were valid sample directories. Skipping tests." ) ;
9090 console . log ( "Extracted folder names that were considered invalid:" , changedFolders ) ;
9191 console . log ( "Full output from find-changes.sh for debugging:\n" , output ) ;
9292 return [ ] ; // Fallback to do nothing
9393 }
94-
94+
9595 console . log ( "Running tests only for changed samples: " , validChangedFolders ) ;
9696 return validChangedFolders ;
9797
@@ -151,14 +151,13 @@ foldersToTest.forEach((sampleFolder) => {
151151 await page . goto ( url ) ;
152152
153153 // Allow some time for async operations and errors to be caught
154- // await page.waitForTimeout(500);
154+ await page . waitForTimeout ( 500 ) ;
155155
156156 // Filter out error messages we can safely avoid.
157157 const filteredErrorMessages = [
158158 'Falling back to Raster' ,
159159 'Attempted to load a 3D Map, but failed.' ,
160160 'The map is not a vector map' ,
161- "Property 'importLibrary' does not exist on type 'Loader'" ,
162161 ] ;
163162 const criticalErrors = consoleErrors . filter ( error =>
164163 ! filteredErrorMessages . some ( message => error . includes ( message ) )
0 commit comments