From 7d4bbb32d8c0e96d6ea8970134ee83cf76a7cc1e Mon Sep 17 00:00:00 2001 From: Luka Isailovic Date: Tue, 13 Feb 2024 13:27:07 +0100 Subject: [PATCH] chore: running multiple files in parallel --- apps/laboratory/playwright.config.ts | 6 +++--- apps/laboratory/tests/connect.spec.ts | 4 ++-- apps/laboratory/tests/shared/pages/ModalPage.ts | 4 ++-- apps/laboratory/tests/shared/pages/WalletPage.ts | 1 - apps/laboratory/tests/shared/validators/ModalValidator.ts | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/laboratory/playwright.config.ts b/apps/laboratory/playwright.config.ts index 276a414959..53e591fada 100644 --- a/apps/laboratory/playwright.config.ts +++ b/apps/laboratory/playwright.config.ts @@ -12,9 +12,9 @@ const PERMUTATIONS = DEVICES.flatMap(device => LIBRARIES.map(library => ({ devic export default defineConfig({ testDir: './tests', - fullyParallel: true, - retries: 0, - workers: 1, + fullyParallel: false, + retries: 3, + workers: 3, reporter: process.env['CI'] ? [['list'], ['html', { open: 'never' }]] : [['list'], ['html', { host: '0.0.0.0' }]], diff --git a/apps/laboratory/tests/connect.spec.ts b/apps/laboratory/tests/connect.spec.ts index f39d84ecca..b92d8db77c 100644 --- a/apps/laboratory/tests/connect.spec.ts +++ b/apps/laboratory/tests/connect.spec.ts @@ -35,7 +35,7 @@ testMW( return } await modalPage.sign() - await walletValidator.expectReceivedSign({chainName: DEFAULT_CHAIN_NAME}) + await walletValidator.expectReceivedSign({ chainName: DEFAULT_CHAIN_NAME }) await walletPage.handleRequest({ accept: true }) await modalValidator.expectAcceptedSign() } @@ -51,7 +51,7 @@ testMW( return } await modalPage.sign() - await walletValidator.expectReceivedSign({chainName: DEFAULT_CHAIN_NAME}) + await walletValidator.expectReceivedSign({ chainName: DEFAULT_CHAIN_NAME }) await walletPage.handleRequest({ accept: false }) await modalValidator.expectRejectedSign() } diff --git a/apps/laboratory/tests/shared/pages/ModalPage.ts b/apps/laboratory/tests/shared/pages/ModalPage.ts index c6331be6e3..7408a8171b 100644 --- a/apps/laboratory/tests/shared/pages/ModalPage.ts +++ b/apps/laboratory/tests/shared/pages/ModalPage.ts @@ -39,8 +39,8 @@ export class ModalPage { await this.connectButton.click() await this.page.getByTestId('wallet-selector-walletconnect').click() await this.page.waitForTimeout(1500) - - return await this.page.getByTestId('wui-qr-code').getAttribute('uri') || '' + + return (await this.page.getByTestId('wui-qr-code').getAttribute('uri')) || '' } async loginWithEmail(email: string) { diff --git a/apps/laboratory/tests/shared/pages/WalletPage.ts b/apps/laboratory/tests/shared/pages/WalletPage.ts index 446471d074..811960c5e0 100644 --- a/apps/laboratory/tests/shared/pages/WalletPage.ts +++ b/apps/laboratory/tests/shared/pages/WalletPage.ts @@ -18,7 +18,6 @@ export class WalletPage { await this.page.goto(this.baseURL) } - /** * Connect by copy pasting URI from clipboard */ diff --git a/apps/laboratory/tests/shared/validators/ModalValidator.ts b/apps/laboratory/tests/shared/validators/ModalValidator.ts index 2fe8ab3e16..aa57effb5a 100644 --- a/apps/laboratory/tests/shared/validators/ModalValidator.ts +++ b/apps/laboratory/tests/shared/validators/ModalValidator.ts @@ -30,7 +30,7 @@ export class ModalValidator { async expectAcceptedSign() { // We use Chakra Toast and it's not quite straightforward to set the `data-testid` attribute on the toast element. await expect(this.page.getByText(ConstantsUtil.SigningSucceededToastTitle)).toBeVisible({ - timeout: 30*1000 + timeout: 30 * 1000 }) }