Commit 84571f45 authored by Max Alekseenko's avatar Max Alekseenko

add test for app info dropdown

parent 621c968a
...@@ -11,6 +11,9 @@ export const apps = [ ...@@ -11,6 +11,9 @@ export const apps = [
description: 'Hop is a scalable rollup-to-rollup general token bridge. It allows users to send tokens from one rollup or sidechain to another almost immediately without having to wait for the networks challenge period.', description: 'Hop is a scalable rollup-to-rollup general token bridge. It allows users to send tokens from one rollup or sidechain to another almost immediately without having to wait for the networks challenge period.',
external: true, external: true,
url: 'https://goerli.hop.exchange/send?token=ETH&sourceNetwork=ethereum', url: 'https://goerli.hop.exchange/send?token=ETH&sourceNetwork=ethereum',
github: [ 'https://github.com/hop-protocol/hop', 'https://github.com/hop-protocol/hop-ui' ],
discord: 'https://discord.gg/hopprotocol',
twitter: 'https://twitter.com/HopProtocol',
}, },
{ {
author: 'Blockscout', author: 'Blockscout',
......
import { test, expect, devices } from '@playwright/experimental-ct-react';
import React from 'react';
import { apps as appsMock } from 'mocks/apps/apps';
import TestApp from 'playwright/TestApp';
import MarketplaceAppInfo from './MarketplaceAppInfo';
test('base view +@dark-mode', async({ mount, page }) => {
await mount(
<TestApp>
<MarketplaceAppInfo data={ appsMock[0] }/>
</TestApp>,
);
await page.getByText('Info').click();
await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 500, height: 400 } });
});
test.describe('mobile', () => {
test.use({ viewport: devices['iPhone 13 Pro'].viewport });
test('base view', async({ mount, page }) => {
await mount(
<TestApp>
<MarketplaceAppInfo data={ appsMock[0] }/>
</TestApp>,
);
await page.getByText('Info').click();
await expect(page).toHaveScreenshot();
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment