Skip to content

Commit

Permalink
Merge pull request #176 from lidofinance/fix-screenshot-on-fail
Browse files Browse the repository at this point in the history
fixed screenshot on the test fail
  • Loading branch information
jake4take authored Aug 14, 2024
2 parents 4ea51aa + 0098126 commit 1c2e6c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions wallets-testing/browser/browser.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,13 @@ export class BrowserService {
}

async connectWallet(): Promise<string> {
try {
const widgetPage = new WIDGET_PAGES[this.widgetConfig.name](
await this.browserContextService.browserContext.newPage(),
this.stakeConfig || {},
);
await widgetPage.navigate();
await widgetPage.connectWallet(this.walletPage);
} finally {
await this.browserContextService.closePages();
}
const widgetPage = new WIDGET_PAGES[this.widgetConfig.name](
await this.browserContextService.browserContext.newPage(),
this.stakeConfig || {},
);
await widgetPage.navigate();
await widgetPage.connectWallet(this.walletPage);
await this.browserContextService.closePages();
return `Success. Wallet ${this.walletPage.config.COMMON.WALLET_NAME} successfully connected`;
}

Expand Down
2 changes: 1 addition & 1 deletion wallets-testing/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const config: PlaywrightTestConfig = {
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 120000,
screenshot: 'only-on-failure',
screenshot: { fullPage: true, mode: 'only-on-failure' },
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',

Expand Down

0 comments on commit 1c2e6c7

Please sign in to comment.