In my playwright.config file I have multiple projects that all has the same setup project as a dependency project.
Is there any way to indicate on runtime, which parent project initiate the setup process?
playwright.config
projects: [
{ name: "setup", testMatch: /.*.setup.ts/ },
{
name: "foo",
dependencies: ["setup"],
},
{
name: "bar",
dependencies: ["setup"],
},
]
setup test
setup("setup test", async ({ page }, testInfo) => {
console.log(testInfo.project.name); // output: "setup"
/* What I'm looking for: */
// console.log(testInfo.paretProject.name);
/* Or */
// console.log(testInfo.project.parentName)
});