Clean up auth state after all E2E tests are done
parent
e020bb9758
commit
397d47b4b5
|
@ -38,6 +38,11 @@ async function globalSetup(/* config: FullConfig */) {
|
||||||
// await loginAsUser("teamfree", browser);
|
// await loginAsUser("teamfree", browser);
|
||||||
await loginAsUser("teampro", browser);
|
await loginAsUser("teampro", browser);
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
// Clean up auth state after all tests are done
|
||||||
|
return () => {
|
||||||
|
const dir = `playwright/artifacts`;
|
||||||
|
fs.readdirSync(dir).forEach((f) => fs.rmSync(`${dir}/${f}`));
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default globalSetup;
|
export default globalSetup;
|
||||||
|
|
Loading…
Reference in New Issue