Skip to content

Commit 4995937

Browse files
authored
feat: Updates Playwright test to exclude listed folders. (#828)
Change-Id: Ia2e8e7e467632d8020f5152c5cc0bd1c4bfbaa57
1 parent d1c2733 commit 4995937

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

e2e/samples.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ import childProcess, { execSync } from 'child_process';
2121

2222
const samplesDir = path.join(__dirname, '..', 'samples');
2323

24+
// Add sample folders to this list to exclude them from the test run.
25+
const excludedFolders = [
26+
'map-drawing-terradraw',
27+
];
28+
2429
// Function to return all sample folders.
2530
const getAllSampleFolders = () => {
2631
return fs.readdirSync(samplesDir).filter((file) => {
@@ -95,7 +100,10 @@ const getChangedSampleFolders = (): string[] => {
95100
}
96101
};
97102

98-
const foldersToTest = getChangedSampleFolders();
103+
// Get changed folders, filtering out excluded ones.
104+
const foldersToTest = getChangedSampleFolders().filter(
105+
(folder) => !excludedFolders.includes(folder)
106+
);
99107

100108
if (foldersToTest.length === 0) {
101109
console.log("No sample folders found.");

0 commit comments

Comments
 (0)