Clean up auth state after all E2E tests are done
This commit is contained in:
1 parent
e020bb9758
commit
397d47b4b5
1 file changed
+5
@@ -38,6 +38,11 @@ async function globalSetup(/* config: FullConfig */) {
|
||||
// await loginAsUser("teamfree", browser);
|
||||
await loginAsUser("teampro", browser);
|
||||
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;
|
||||
Reference in new issue
Block a user