File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
src/components/Simulator/screens/SendReceive Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { getMaxFractionDigitsUsd } from "../../utils"
11
11
import { WalletHome } from "../../WalletHome"
12
12
import type { TokenBalance } from "../../WalletHome/interfaces"
13
13
14
- const ICON_SIZE = "size- 4.5rem"
14
+ const ICON_SIZE = "text-[ 4.5rem] "
15
15
16
16
type SuccessProps = {
17
17
tokenBalances : Array < TokenBalance >
@@ -100,6 +100,7 @@ export const Success = ({
100
100
initial = { { scale : 0 } }
101
101
animate = { { scale : 1 } }
102
102
transition = { { type : "spring" , delay : 0.25 } }
103
+ data-testid = "success-icon"
103
104
>
104
105
< PiCheckThin className = { cn ( ICON_SIZE , "-rotate-[10deg]" ) } />
105
106
</ motion . div >
@@ -108,7 +109,7 @@ export const Success = ({
108
109
{ txPending ? (
109
110
"Sending transaction"
110
111
) : (
111
- < span data-testid = "success-message" >
112
+ < span >
112
113
You sent{ " " }
113
114
< strong >
114
115
< > { sentEthValue } ETH</ >
Original file line number Diff line number Diff line change @@ -107,8 +107,18 @@ export const Success: Story = {
107
107
play : async ( { canvasElement } ) => {
108
108
const canvas = within ( canvasElement )
109
109
110
- await waitFor ( async ( ) => {
111
- expect ( canvas . getByTestId ( "success-message" ) ) . toBeInTheDocument ( )
112
- } )
110
+ await waitFor (
111
+ async ( ) => {
112
+ const successIcon = canvas . getByTestId ( "success-icon" )
113
+ console . log ( "🚀 ~ successIcon:" , successIcon )
114
+ await expect ( successIcon ) . toBeInTheDocument ( )
115
+ await expect ( successIcon ) . toHaveStyle ( {
116
+ transform : "none" ,
117
+ } )
118
+ } ,
119
+ {
120
+ timeout : 10000 ,
121
+ }
122
+ )
113
123
} ,
114
124
}
You can’t perform that action at this time.
0 commit comments