mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
28 lines
815 B
TypeScript
28 lines
815 B
TypeScript
import React from 'react';
|
|
|
|
import { test, expect } from 'playwright/lib';
|
|
|
|
import SocketNewItemsNotice from './SocketNewItemsNotice';
|
|
|
|
const hooksConfig = {
|
|
router: {
|
|
pathname: '/tx/[hash]',
|
|
query: {},
|
|
},
|
|
};
|
|
|
|
test('2 new items in validated txs list +@dark-mode', async({ render }) => {
|
|
const component = await render(<SocketNewItemsNotice url="/" num={ 2 }/>, { hooksConfig });
|
|
await expect(component).toHaveScreenshot();
|
|
});
|
|
|
|
test('connection loss', async({ render }) => {
|
|
const component = await render(<SocketNewItemsNotice url="/" showErrorAlert/>, { hooksConfig });
|
|
await expect(component).toHaveScreenshot();
|
|
});
|
|
|
|
test('fetching', async({ render }) => {
|
|
const component = await render(<SocketNewItemsNotice url="/"/>, { hooksConfig });
|
|
await expect(component).toHaveScreenshot();
|
|
});
|