Files
studio-desktop/tests/integration/post-install.teardown.ts
filteredandGitHub da8464388f [e2e] Improve teardown - full desktop screenshot (#993)
* [e2e] Always dispose temp dir

* [e2e] Screenshot entire desktop on close failure

* nit
2025-02-25 14:49:50 +11:00

18 lines
700 B
TypeScript

import { pathExists } from '../shared/utils';
import { TestEnvironment } from './testEnvironment';
import { assertPlaywrightEnabled, expect, test as teardown } from './testExtensions';
// This "test" is a setup process.
// After running, the test environment should be completely uninstalled.
teardown('Completely uninstalls the app', async ({}) => {
assertPlaywrightEnabled();
const testEnvironment = new TestEnvironment();
await testEnvironment.deleteAppData();
await testEnvironment.deleteDefaultInstallLocation();
await expect(pathExists(testEnvironment.appDataDir)).resolves.toBeFalsy();
await expect(pathExists(testEnvironment.defaultInstallLocation)).resolves.toBeFalsy();
});