diff --git a/packages/e2e-assets/playwright.config.ts b/packages/e2e-assets/playwright.config.ts index 5533c3add..b9a25c2cb 100644 --- a/packages/e2e-assets/playwright.config.ts +++ b/packages/e2e-assets/playwright.config.ts @@ -30,12 +30,4 @@ export default defineConfig({ screenshot: 'only-on-failure', headless: false, }, - projects: [ - { - name: 'chromium', - use: { - ...devices['Desktop Chromium'], - }, - }, - ], }); diff --git a/packages/e2e-assets/playwright/crx/assets.test.ts b/packages/e2e-assets/playwright/crx/assets.test.ts index 3265f0fc6..d037c3917 100644 --- a/packages/e2e-assets/playwright/crx/assets.test.ts +++ b/packages/e2e-assets/playwright/crx/assets.test.ts @@ -1,9 +1,13 @@ -import { expect, test } from '@playwright/test'; +import { type Page, expect, test } from '@playwright/test'; import { hasText, waitAriaLabel } from '../commons'; test.describe('Check assets', () => { - test('should show valid asset values', async ({ page }) => { - await page.goto('http://localhost:3000'); + let page: Page; + test.beforeAll(async ({ browser }) => { + page = await browser.newPage(); + await page.goto('http://localhost:3000', { + waitUntil: 'domcontentloaded', + }); await test.step('Import wallet', async () => { await page.getByRole('heading', { name: 'Import seed phrase' }).click(); @@ -13,10 +17,10 @@ test.describe('Check assets', () => { const words = mnemonic.split(' '); for (const [index, word] of words.entries()) { + console.log(`Filling word ${index + 1}: ${word}`); const locator = page.locator('div').filter({ hasText: new RegExp(`^${index + 1}$`), }); - console.log(`Filling word ${index + 1}: ${word}`); const input = locator.getByLabel('Type your text'); await input.fill(word); console.log(`Filled word ${index + 1}`); @@ -32,14 +36,23 @@ test.describe('Check assets', () => { await page.getByLabel('Selected Network').click(); await page.getByText('Fuel Sepolia Testnet').click(); await waitAriaLabel(page, 'Account 1 selected'); - expect( - await page.getByText('0.002000', { exact: true }).isVisible() - ).toBeTruthy(); - expect( - await page.getByText('USDCIcon AlertTriangle').isVisible() - ).toBeTruthy(); - expect(await page.getByText('1 SCAM').isVisible()).toBeTruthy(); - await page.close(); }); }); + + test.describe.configure({ mode: 'parallel' }); + test('should show valid asset value 0.002000', async () => { + expect( + await page.getByText('0.002000', { exact: true }).isVisible() + ).toBeTruthy(); + }); + + test('should show USDCIcon AlertTriangle', async () => { + expect( + await page.getByText('USDCIcon AlertTriangle').isVisible() + ).toBeTruthy(); + }); + + test('should show 1 SCAM', async () => { + expect(await page.getByText('1 SCAM').isVisible()).toBeTruthy(); + }); });