Files
explore/ui/txs/TxAdditionalInfo.pw.tsx
tom goriunovandGitHub 1b977de269 Playwright tests refactoring, pt.5 (#1952)
* next part of test refactoring

* more refactoring

* more refactoring

* fixes and clean-up

* fixes

* build fixes

* more fixes
2024-05-25 15:41:32 +02:00

25 lines
1011 B
TypeScript

import React from 'react';
import * as txMock from 'mocks/txs/tx';
import { test, expect } from 'playwright/lib';
import TxAdditionalInfo from './TxAdditionalInfo';
test('regular transaction +@dark-mode', async({ render, page }) => {
const component = await render(<TxAdditionalInfo tx={ txMock.base }/>);
await component.getByLabel('Transaction info').click();
await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 400, height: 600 } });
});
test('regular transaction +@mobile -@default', async({ render, page }) => {
const component = await render(<TxAdditionalInfo tx={ txMock.base } isMobile/>);
await component.getByLabel('Transaction info').click();
await expect(page).toHaveScreenshot();
});
test('blob transaction', async({ render, page }) => {
const component = await render(<TxAdditionalInfo tx={ txMock.withBlob }/>);
await component.getByLabel('Transaction info').click();
await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 400, height: 600 } });
});