Skip to content

Commit

Permalink
fix: generate log .zip before failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
a0ngo committed Dec 13, 2023
1 parent ab60232 commit a5802f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-walls-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/e2e-tests': minor
---

fix: console generated error generates log zip instead of crashing first
7 changes: 5 additions & 2 deletions packages/e2e-tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import {
} from './transfer-utils';
import { testAssets } from './tests';
import { AssetTestConfig, FixError, SkipError } from './types';
import { assert, skipTest, wrapStep } from './utils';
import { assert, skipTest, testFailed, wrapStep } from './utils';
import { navigateToVault, reset } from './test-utils';

let recoveryApp: ElectronApplication, relayApp: ElectronApplication;
let relayWindow: Page, utilWindow: Page;
let assetId: string;

dotenv.config({ path: `${__dirname}/.env` });

Expand Down Expand Up @@ -68,10 +69,12 @@ const consoleMessageCallback = (windowType: 'utility' | 'relay') => async (msg:
}

console.error(`${windowType.toUpperCase()} Faced an error: ${msg.text()}`);
throw new Error(msg.text());
await testFailed(windowType, assetId);
// throw new Error(msg.text());
};

const tryTransferAsset = (assetConfig: AssetTestConfig) => {
assetId = assetConfig.assetId;
const transferAsset = async (testInfo: TestInfo): Promise<void> => {
const relayWindow = await relayApp.firstWindow();
const utilWindow = await recoveryApp.firstWindow();
Expand Down

0 comments on commit a5802f7

Please sign in to comment.