Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Dec 2, 2024
1 parent 74ad911 commit ff20d78
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions ui/pages/ScrollL2TxnBatches.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';

import * as scrollTxnBatchesMock from 'mocks/scroll/txnBatches';
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
import { test, expect } from 'playwright/lib';
import { test, expect, devices } from 'playwright/lib';

import ScrollL2TxnBatches from './ScrollL2TxnBatches';

test('base view +@mobile', async({ render, mockEnvs, mockTextAd, mockApiResponse }) => {
test('base view', async({ render, mockEnvs, mockTextAd, mockApiResponse }) => {
test.slow();
await mockEnvs(ENVS_MAP.scrollRollup);
await mockTextAd();
Expand All @@ -16,3 +16,18 @@ test('base view +@mobile', async({ render, mockEnvs, mockTextAd, mockApiResponse
const component = await render(<ScrollL2TxnBatches/>);
await expect(component).toHaveScreenshot();
});

test.describe('mobile', () => {
test.use({ viewport: devices['iPhone 13 Pro'].viewport });

test('base view', async({ render, mockEnvs, mockTextAd, mockApiResponse }) => {
test.slow();
await mockEnvs(ENVS_MAP.scrollRollup);
await mockTextAd();
await mockApiResponse('scroll_l2_txn_batches', scrollTxnBatchesMock.baseResponse);
await mockApiResponse('scroll_l2_txn_batches_count', 9927);

const component = await render(<ScrollL2TxnBatches/>);
await expect(component).toHaveScreenshot();
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ff20d78

Please sign in to comment.