-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ui): improve e2e playwright test stability (#1116)
- Loading branch information
1 parent
e0845ab
commit c4c7e9d
Showing
14 changed files
with
119 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
import { test } from '@playwright/test'; | ||
import { cleanup } from './helpers/cleanup'; | ||
import { getOpenAIClient } from './fixtures'; | ||
import fs from 'node:fs'; | ||
|
||
test('teardown', async () => { | ||
const openAIClient = await getOpenAIClient(); | ||
console.log('cleaning up...'); | ||
await cleanup(openAIClient); | ||
// Check if the auth file exists and delete it | ||
const filePath = 'playwright/.auth/user.json'; | ||
if (fs.existsSync(filePath)) { | ||
fs.unlink(filePath, (err) => { | ||
if (err) { | ||
console.error('Error deleting the auth file:', err); | ||
} else { | ||
console.log('Auth file deleted successfully.'); | ||
} | ||
}); | ||
} else { | ||
console.log('Auth file not found.'); | ||
} | ||
console.log('clean up complete'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.