File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,12 @@ export class TestEnvironment implements AsyncDisposable {
121
121
await rm ( this . defaultInstallLocation , { recursive : true , force : true } ) ;
122
122
}
123
123
124
+ async deleteLogsIfPresent ( ) {
125
+ assertPlaywrightEnabled ( ) ;
126
+ await rm ( this . mainLogPath , { force : true } ) ;
127
+ await rm ( this . comfyuiLogPath , { force : true } ) ;
128
+ }
129
+
124
130
async [ Symbol . asyncDispose ] ( ) {
125
131
await this . restoreInstallPath ( ) ;
126
132
await this . restoreVenv ( ) ;
Original file line number Diff line number Diff line change @@ -59,11 +59,13 @@ export const test = baseTest.extend<DesktopTestOptions & DesktopTestFixtures>({
59
59
app . shouldDisposeTestEnvironment = disposeTestEnvironment ;
60
60
await use ( app ) ;
61
61
62
- if ( ! disposeTestEnvironment ) return ;
63
-
64
62
// Attach logs after test
65
- await attachIfExists ( testInfo , app . testEnvironment . mainLogPath ) ;
66
- await attachIfExists ( testInfo , app . testEnvironment . comfyuiLogPath ) ;
63
+ const testEnv = app . testEnvironment ;
64
+ await attachIfExists ( testInfo , testEnv . mainLogPath ) ;
65
+ await attachIfExists ( testInfo , testEnv . comfyuiLogPath ) ;
66
+
67
+ // Delete logs if present
68
+ await testEnv . deleteLogsIfPresent ( ) ;
67
69
} ,
68
70
window : async ( { app } , use , testInfo ) => {
69
71
const window = await app . firstWindow ( ) ;
You can’t perform that action at this time.
0 commit comments