Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more test fixes
Browse files Browse the repository at this point in the history
tom2drum committed Jul 9, 2024
1 parent 5387d7a commit e5aeec2
Showing 3 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ui/home/indicators/ChainIndicators.pw.tsx
Original file line number Diff line number Diff line change
@@ -41,19 +41,23 @@ test.describe('daily txs chart', () => {
});
});

test('partial data', async({ page, mockApiResponse, render }) => {
test('partial data', async({ page, mockApiResponse, mockAssetResponse, render }) => {
await mockApiResponse('stats', statsMock.base);
await mockApiResponse('stats_charts_txs', dailyTxsMock.partialData);
await mockAssetResponse(statsMock.base.coin_image as string, './playwright/mocks/image_s.jpg');

const component = await render(<ChainIndicators/>);
await page.waitForFunction(() => {
return document.querySelector('path[data-name="gradient-chart-area"]')?.getAttribute('opacity') === '1';
});
await expect(component).toHaveScreenshot();
});

test('no data', async({ mockApiResponse, render }) => {
test('no data', async({ mockApiResponse, mockAssetResponse, render }) => {
await mockApiResponse('stats', statsMock.noChartData);
await mockApiResponse('stats_charts_txs', dailyTxsMock.noData);
await mockAssetResponse(statsMock.base.coin_image as string, './playwright/mocks/image_s.jpg');

const component = await render(<ChainIndicators/>);
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.

0 comments on commit e5aeec2

Please sign in to comment.