Skip to content

Commit

Permalink
test(widgets): hide price chart for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr committed Sep 4, 2023
1 parent 3c47ff7 commit 131294e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/PriceChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { IThemeColors } from '../styles/themes';
import { SlashFeedJSON, TGraphPeriod } from '../store/types/widgets';
import useColors from '../hooks/colors';
import { webRelayClient, webRelayUrl } from './SlashtagsProvider';
import { __E2E__ } from '../constants/env';

export type Change = {
color: keyof IThemeColors;
Expand Down Expand Up @@ -191,12 +192,14 @@ const PriceChart = ({

return (
<View style={[styles.root, style]}>
<Chart
style={styles.priceChart}
values={history.pastValues}
positive={history.change.color === 'green'}
period={period}
/>
{!__E2E__ && (
<Chart
style={styles.priceChart}
values={history.pastValues}
positive={history.change.color === 'green'}
period={period}
/>
)}
</View>
);
};
Expand Down

0 comments on commit 131294e

Please sign in to comment.