Skip to content

Commit

Permalink
fix SearchBar test
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Dec 15, 2023
1 parent fbba31f commit e0c4f57
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions ui/snippets/searchBar/SearchBar.pw.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LightMode } from '@chakra-ui/react';
import { test as base, expect } from '@playwright/experimental-ct-react';
import React from 'react';

Expand Down Expand Up @@ -93,9 +92,7 @@ test('search by name homepage +@dark-mode', async({ mount, page }) => {

await mount(
<TestApp>
<LightMode>
<SearchBar isHomepage/>
</LightMode>
<SearchBar isHomepage/>
</TestApp>,
);
await page.getByPlaceholder(/search/i).type('o');
Expand Down
6 changes: 0 additions & 6 deletions ui/snippets/searchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ const SearchBar = ({ isHomepage }: Props) => {
<PopoverBody
p={ 0 }
color="chakra-body-text"
sx={
isHomepage ? {
mark: { bgColor: 'green.100' },
'*::-webkit-scrollbar-thumb': { backgroundColor: 'blackAlpha.300' },
} : {}
}
>
<Box
maxH="50vh"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ui/snippets/topBar/TopBarStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const TopBarStats = () => {
<span>${ Number(data.coin_price).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 6 }) }</span>
</Skeleton>
) }
{ data?.coin_price && data.gas_prices && <TextSeparator color="divider"/> }
{ data?.gas_prices && (
{ data?.coin_price && config.UI.homepage.showGasTracker && <TextSeparator color="divider"/> }
{ data?.gas_prices && config.UI.homepage.showGasTracker && (
<Skeleton isLoaded={ !isPlaceholderData }>
<span>Gas: { data.gas_prices.average } Gwei</span>
</Skeleton>
Expand Down

0 comments on commit e0c4f57

Please sign in to comment.