Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Nov 19, 2024
1 parent 5942dd5 commit 2040f1d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion ui/address/tokenSelect/TokenSelect.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test('base view +@dark-mode', async({ render, page }) => {
);

await page.getByRole('button', { name: /select/i }).click();
await page.getByText('USD Coin').hover();

await expect(page).toHaveScreenshot({ clip: CLIPPING_AREA });

Expand Down
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.
11 changes: 8 additions & 3 deletions ui/token/TokenInventory.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ import { Box } from '@chakra-ui/react';
import React from 'react';

import { tokenInfoERC721a } from 'mocks/tokens/tokenInfo';
import { base as tokenInstanse } from 'mocks/tokens/tokenInstance';
import { base as tokenInstance } from 'mocks/tokens/tokenInstance';
import { test, expect } from 'playwright/lib';

import TokenInventory from './TokenInventory';

test('base view +@mobile', async({ render }) => {
test('base view +@mobile', async({ render, mockAssetResponse }) => {

const item = { ...tokenInstance, image_url: null };

await mockAssetResponse(tokenInstance.image_url as string, './playwright/mocks/image_s.jpg');

const component = await render(
<Box pt={{ base: '134px', lg: 0 }}>
<TokenInventory

// @ts-ignore:
inventoryQuery={{
data: {
items: [ tokenInstanse, tokenInstanse, tokenInstanse ],
items: [ tokenInstance, item, item ],
next_page_params: { unique_token: 1 },
},

Expand Down
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 2040f1d

Please sign in to comment.