mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* next part of test refactoring * more refactoring * more refactoring * fixes and clean-up * fixes * build fixes * more fixes
25 lines
1011 B
TypeScript
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 } });
|
|
});
|