Fix: data test ids for price change and visual regression fixes (#511)
* fix: add data test ids for price change percentage * fix: add data test id for dialog overlay
This commit is contained in:
parent
554097e391
commit
5f8061d5ce
@ -26,7 +26,7 @@ export const LandingDialog = ({ open, setOpen }: LandingDialogProps) => {
|
||||
<AsyncRenderer loading={loading} error={error} data={data}>
|
||||
<Dialog
|
||||
title={t('Select a market to get started')}
|
||||
intent={Intent.Warning}
|
||||
intent={Intent.Primary}
|
||||
open={open}
|
||||
onChange={setClose}
|
||||
titleClassNames="font-bold font-sans text-3xl tracking-tight mb-0 pl-8"
|
||||
|
@ -14,7 +14,7 @@ export const SelectMarketDialog = ({
|
||||
return (
|
||||
<Dialog
|
||||
title={t('Select a market')}
|
||||
intent={Intent.Warning}
|
||||
intent={Intent.Primary}
|
||||
open={dialogOpen}
|
||||
onChange={() => setDialogOpen(false)}
|
||||
titleClassNames="font-bold font-sans text-3xl tracking-tight mb-0 pl-8"
|
||||
|
@ -35,7 +35,10 @@ export function Dialog({
|
||||
return (
|
||||
<DialogPrimitives.Root open={open} onOpenChange={(x) => onChange(x)}>
|
||||
<DialogPrimitives.Portal>
|
||||
<DialogPrimitives.Overlay className="fixed inset-0 bg-black/50 z-10" />
|
||||
<DialogPrimitives.Overlay
|
||||
className="fixed inset-0 bg-black/50 z-10"
|
||||
data-testid="dialog-overlay"
|
||||
/>
|
||||
<DialogPrimitives.Content className={contentClasses}>
|
||||
<DialogPrimitives.Close
|
||||
className="p-12 absolute top-0 right-0"
|
||||
|
@ -54,15 +54,15 @@ export const PriceCellChange = React.memo(
|
||||
)} flex items-center gap-4 justify-end`}
|
||||
>
|
||||
<Arrow value={change} />
|
||||
<span className="flex items-center gap-6 font-mono">
|
||||
<span>
|
||||
<span className="flex items-center gap-6 font-mono text-ui-small">
|
||||
<span data-testid="price-change-percentage">
|
||||
{formatNumberPercentage(
|
||||
new BigNumber(changePercentage.toString()),
|
||||
2
|
||||
)}
|
||||
|
||||
</span>
|
||||
<span>
|
||||
<span data-testid="price-change">
|
||||
{addDecimalsFormatNumber(change.toString(), decimalPlaces ?? 0, 3)}
|
||||
</span>
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user