mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
ci: Playwright project organization (#17905)
This commit is contained in:
@@ -20,6 +20,22 @@ function findProjectRoot(marker: string): string {
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a folder root by searching upwards for a marker folder named 'packages'.
|
||||
* @returns The absolute path to the folder root.
|
||||
*/
|
||||
export function findPackagesRoot(marker: string): string {
|
||||
let dir = __dirname;
|
||||
while (!fs.existsSync(path.join(dir, marker))) {
|
||||
const parentDir = path.dirname(dir);
|
||||
if (parentDir === dir) {
|
||||
throw new TestError('Could not find packages root');
|
||||
}
|
||||
dir = parentDir;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
const playwrightRoot = findProjectRoot('playwright.config.ts');
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user